└── debian ├── source └── format ├── ceph-libboost1.79-dev.dirs ├── libboost-dev.examples ├── gbp.conf ├── libboost1.80-dev.examples ├── tests ├── srcs │ ├── graph-parallel │ │ ├── weighted_graph.gr │ │ ├── CMakeLists.txt │ │ ├── demo2.cpp │ │ └── demo1.cpp │ ├── program-options │ │ ├── multiple_sources.cfg │ │ ├── CMakeLists.txt │ │ ├── demo1.cpp │ │ └── demo2.cpp │ ├── wave │ │ ├── demo1_test.cpp │ │ ├── CMakeLists.txt │ │ ├── demo1.cpp │ │ └── demo2.cpp │ ├── mpi-python │ │ ├── demo1.py │ │ └── demo2.py │ ├── atomic │ │ ├── CMakeLists.txt │ │ ├── demo1.cpp │ │ └── demo2.cpp │ ├── python │ │ ├── demo1.cpp │ │ ├── CMakeLists.txt │ │ └── demo2.cpp │ ├── container │ │ ├── CMakeLists.txt │ │ ├── demo2.cpp │ │ ├── demo1.cpp │ │ └── demo3.cpp │ ├── math │ │ └── CMakeLists.txt │ ├── fiber │ │ ├── CMakeLists.txt │ │ └── demo1.cpp │ ├── locale │ │ ├── CMakeLists.txt │ │ ├── demo2.cpp │ │ └── demo1.cpp │ ├── random │ │ ├── CMakeLists.txt │ │ ├── demo1.cpp │ │ └── demo2.cpp │ ├── regex │ │ ├── CMakeLists.txt │ │ ├── demo1.cpp │ │ └── demo2.cpp │ ├── system │ │ ├── CMakeLists.txt │ │ └── demo1.cpp │ ├── timer │ │ ├── CMakeLists.txt │ │ ├── demo2.cpp │ │ └── demo1.cpp │ ├── log │ │ ├── CMakeLists.txt │ │ ├── demo1.cpp │ │ └── demo2.cpp │ ├── signals │ │ ├── CMakeLists.txt │ │ ├── demo1.cpp │ │ └── demo2.cpp │ ├── filesystem │ │ ├── CMakeLists.txt │ │ ├── demo2.cpp │ │ └── demo1.cpp │ ├── iostreams │ │ ├── CMakeLists.txt │ │ ├── demo1.cpp │ │ ├── demo2.cpp │ │ └── container_device.hpp │ ├── chrono │ │ ├── CMakeLists.txt │ │ ├── demo2.cpp │ │ └── demo1.cpp │ ├── datetime │ │ ├── CMakeLists.txt │ │ ├── demo1.cpp │ │ └── demo2.cpp │ ├── exception │ │ ├── CMakeLists.txt │ │ └── demo2.cpp │ ├── test │ │ ├── CMakeLists.txt │ │ ├── demo2.cpp │ │ └── demo1.cpp │ ├── thread │ │ ├── CMakeLists.txt │ │ ├── demo1.cpp │ │ └── demo2.cpp │ ├── type-erasure │ │ └── CMakeLists.txt │ ├── coroutine │ │ ├── CMakeLists.txt │ │ ├── demo1.cpp │ │ └── demo2.cpp │ ├── serialization │ │ ├── CMakeLists.txt │ │ └── demo2.cpp │ ├── mpi │ │ ├── demo1.cpp │ │ ├── demo4.cpp │ │ ├── demo2.cpp │ │ ├── demo6.cpp │ │ ├── CMakeLists.txt │ │ ├── demo5.cpp │ │ └── demo3.cpp │ ├── graph │ │ ├── CMakeLists.txt │ │ └── demo1.cpp │ ├── stacktrace │ │ ├── CMakeLists.txt │ │ ├── demo1.cpp │ │ └── demo2.cpp │ └── context │ │ ├── CMakeLists.txt │ │ ├── demo2.cpp │ │ └── demo1.cpp ├── gio │ ├── simple_test │ ├── control │ ├── test_align.cpp │ └── test_any.cpp ├── fiber ├── math ├── test ├── atomic ├── chrono ├── datetime ├── locale ├── random ├── signals ├── system ├── thread ├── timer ├── coroutine ├── exception ├── stacktrace ├── filesystem ├── iostreams ├── serialization ├── type-erasure ├── log ├── mpi-python ├── wave ├── program-options ├── graph ├── container ├── regex ├── context ├── graph-parallel ├── python ├── list_of_packages ├── mpi └── control ├── patches ├── series ├── fix-mpi-python37.patch ├── 15.patch ├── 116.patch ├── fix_extension.patch └── 20_remove_privacy_breach.patch ├── watch ├── salsa-ci.yml ├── libboost-doc.README.Debian ├── Notes ├── libboost-doc.doc-base.in ├── inspect.1 ├── README.source ├── quickbook.1 ├── README.copyright ├── example-files ├── update-control.py ├── generate-docfiles-list.py ├── NEWS.old ├── bcp.1 └── README.Debian /debian/source/format: -------------------------------------------------------------------------------- 1 | 3.0 (quilt) -------------------------------------------------------------------------------- /debian/ceph-libboost1.79-dev.dirs: -------------------------------------------------------------------------------- 1 | /etc/ld.so.conf.d 2 | -------------------------------------------------------------------------------- /debian/libboost-dev.examples: -------------------------------------------------------------------------------- 1 | libs/random/src/random_device.cpp 2 | -------------------------------------------------------------------------------- /debian/gbp.conf: -------------------------------------------------------------------------------- 1 | [DEFAULT] 2 | pristine-tar = False 3 | overlay = True 4 | -------------------------------------------------------------------------------- /debian/libboost1.80-dev.examples: -------------------------------------------------------------------------------- 1 | libs/random/src/random_device.cpp 2 | -------------------------------------------------------------------------------- /debian/tests/srcs/graph-parallel/weighted_graph.gr: -------------------------------------------------------------------------------- 1 | 5 9 1 2 | 3 1 3 | 2 2 4 1 5 2 4 | 2 7 4 3 5 | 5 1 6 | 1 1 2 1 -------------------------------------------------------------------------------- /debian/patches/series: -------------------------------------------------------------------------------- 1 | 15.patch 2 | 20_remove_privacy_breach.patch 3 | 116.patch 4 | fix-mpi-python37.patch 5 | fix_extension.patch -------------------------------------------------------------------------------- /debian/watch: -------------------------------------------------------------------------------- 1 | version=4 2 | opts=uversionmangle=s/_/./g,dversionmangle=s/\+dfsg$// https://dl.bintray.com/boostorg/release/([\d.]*)/source boost_([\d_]*)\.tar.bz2 3 | -------------------------------------------------------------------------------- /debian/tests/srcs/program-options/multiple_sources.cfg: -------------------------------------------------------------------------------- 1 | # 2 | # Comment out this line to use hard-coded default value of 10 3 | # 4 | optimization = 1 5 | include-path = /opt -------------------------------------------------------------------------------- /debian/tests/srcs/wave/demo1_test.cpp: -------------------------------------------------------------------------------- 1 | 2 | int main(int argc, char *argv[]) 3 | { 4 | if (2 != argc) { 5 | std::cerr << "Usage: advanced_hooks infile" << std::endl; 6 | return -1; 7 | } 8 | -------------------------------------------------------------------------------- /debian/tests/srcs/mpi-python/demo1.py: -------------------------------------------------------------------------------- 1 | # https://www.boost.org/doc/libs/1_67_0/doc/html/mpi/tutorial.html#mpi.python 2 | 3 | import boost.mpi as mpi 4 | 5 | print("I am process %d of %d." % (mpi.rank, mpi.size)) 6 | -------------------------------------------------------------------------------- /debian/salsa-ci.yml: -------------------------------------------------------------------------------- 1 | --- 2 | include: 3 | - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/recipes/debian.yml 4 | 5 | # Do not execute very slow jobs 6 | variables: 7 | SALSA_CI_DISABLE_BLHC: 1 8 | SALSA_CI_DISABLE_REPROTEST: 1 9 | -------------------------------------------------------------------------------- /debian/tests/gio/simple_test: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | SOURCE_FILENAME="$1" 6 | EXEC_FILENAME="$2" 7 | 8 | cp "$SOURCE_FILENAME" "$AUTOPKGTEST_TMP" 9 | cd "$AUTOPKGTEST_TMP" 10 | g++ -o "$EXEC_FILENAME" `basename "$SOURCE_FILENAME"` 11 | ./"$EXEC_FILENAME" 12 | -------------------------------------------------------------------------------- /debian/tests/srcs/atomic/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project(Boost CXX) 2 | cmake_minimum_required(VERSION 3.0) 3 | 4 | FIND_PACKAGE(Boost COMPONENTS atomic REQUIRED) 5 | INCLUDE_DIRECTORIES (${Boost_INCLUDE_DIRS}) 6 | 7 | ADD_EXECUTABLE(demo1 demo1.cpp) 8 | ADD_EXECUTABLE(demo2 demo2.cpp) 9 | -------------------------------------------------------------------------------- /debian/tests/srcs/python/demo1.cpp: -------------------------------------------------------------------------------- 1 | // https://www.boost.org/doc/libs/1_67_0/libs/python/doc/html/tutorial/index.html#tutorial.quickstart 2 | #include 3 | 4 | char const *greet() { return "hello, world"; } 5 | 6 | BOOST_PYTHON_MODULE(libdemo1) 7 | { 8 | using namespace boost::python; 9 | def("greet", greet); 10 | } -------------------------------------------------------------------------------- /debian/tests/srcs/container/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project(Boost CXX) 2 | cmake_minimum_required(VERSION 3.0) 3 | 4 | FIND_PACKAGE(Boost COMPONENTS container system REQUIRED) 5 | INCLUDE_DIRECTORIES (${Boost_INCLUDE_DIRS}) 6 | 7 | ADD_EXECUTABLE(demo1 demo1.cpp) 8 | 9 | ADD_EXECUTABLE(demo2 demo2.cpp) 10 | 11 | ADD_EXECUTABLE(demo3 demo3.cpp) 12 | -------------------------------------------------------------------------------- /debian/tests/srcs/math/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project(Boost CXX) 2 | cmake_minimum_required(VERSION 3.0) 3 | 4 | FIND_PACKAGE(Boost REQUIRED) 5 | INCLUDE_DIRECTORIES (${Boost_INCLUDE_DIRS}) 6 | 7 | ADD_EXECUTABLE(demo1 demo1.cpp) 8 | TARGET_LINK_LIBRARIES(demo1 ${Boost_LIBRARIES}) 9 | 10 | ADD_EXECUTABLE(demo2 demo2.cpp) 11 | TARGET_LINK_LIBRARIES(demo2 ${Boost_LIBRARIES}) -------------------------------------------------------------------------------- /debian/tests/srcs/fiber/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project(Boost CXX) 2 | cmake_minimum_required(VERSION 3.0) 3 | 4 | FIND_PACKAGE(Boost COMPONENTS fiber REQUIRED) 5 | INCLUDE_DIRECTORIES (${Boost_INCLUDE_DIRS}) 6 | 7 | ADD_EXECUTABLE(demo1 demo1.cpp) 8 | TARGET_LINK_LIBRARIES(demo1 ${Boost_LIBRARIES}) 9 | 10 | ADD_EXECUTABLE(demo2 demo2.cpp) 11 | TARGET_LINK_LIBRARIES(demo2 ${Boost_LIBRARIES}) -------------------------------------------------------------------------------- /debian/tests/srcs/locale/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project(Boost CXX) 2 | cmake_minimum_required(VERSION 3.0) 3 | 4 | FIND_PACKAGE(Boost COMPONENTS locale REQUIRED) 5 | INCLUDE_DIRECTORIES (${Boost_INCLUDE_DIRS}) 6 | 7 | ADD_EXECUTABLE(demo1 demo1.cpp) 8 | TARGET_LINK_LIBRARIES(demo1 ${Boost_LIBRARIES}) 9 | 10 | ADD_EXECUTABLE(demo2 demo2.cpp) 11 | TARGET_LINK_LIBRARIES(demo2 ${Boost_LIBRARIES}) -------------------------------------------------------------------------------- /debian/tests/srcs/random/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project(Boost CXX) 2 | cmake_minimum_required(VERSION 3.0) 3 | 4 | FIND_PACKAGE(Boost COMPONENTS random REQUIRED) 5 | INCLUDE_DIRECTORIES (${Boost_INCLUDE_DIRS}) 6 | 7 | ADD_EXECUTABLE(demo1 demo1.cpp) 8 | TARGET_LINK_LIBRARIES(demo1 ${Boost_LIBRARIES}) 9 | 10 | ADD_EXECUTABLE(demo2 demo2.cpp) 11 | TARGET_LINK_LIBRARIES(demo2 ${Boost_LIBRARIES}) -------------------------------------------------------------------------------- /debian/tests/srcs/regex/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project(Boost CXX) 2 | cmake_minimum_required(VERSION 3.0) 3 | 4 | FIND_PACKAGE(Boost COMPONENTS regex REQUIRED) 5 | INCLUDE_DIRECTORIES (${Boost_INCLUDE_DIRS}) 6 | 7 | ADD_EXECUTABLE(demo1 demo1.cpp) 8 | TARGET_LINK_LIBRARIES(demo1 ${Boost_LIBRARIES}) 9 | 10 | ADD_EXECUTABLE(demo2 demo2.cpp) 11 | TARGET_LINK_LIBRARIES(demo2 ${Boost_LIBRARIES}) -------------------------------------------------------------------------------- /debian/tests/srcs/system/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project(Boost CXX) 2 | cmake_minimum_required(VERSION 3.0) 3 | 4 | FIND_PACKAGE(Boost COMPONENTS system REQUIRED) 5 | INCLUDE_DIRECTORIES (${Boost_INCLUDE_DIRS}) 6 | 7 | ADD_EXECUTABLE(demo1 demo1.cpp) 8 | TARGET_LINK_LIBRARIES(demo1 ${Boost_LIBRARIES}) 9 | 10 | ADD_EXECUTABLE(demo2 demo2.cpp) 11 | TARGET_LINK_LIBRARIES(demo2 ${Boost_LIBRARIES}) -------------------------------------------------------------------------------- /debian/tests/srcs/timer/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project(Boost CXX) 2 | cmake_minimum_required(VERSION 3.0) 3 | 4 | FIND_PACKAGE(Boost COMPONENTS timer REQUIRED) 5 | INCLUDE_DIRECTORIES (${Boost_INCLUDE_DIRS}) 6 | 7 | ADD_EXECUTABLE(demo1 demo1.cpp) 8 | TARGET_LINK_LIBRARIES(demo1 ${Boost_LIBRARIES}) 9 | 10 | ADD_EXECUTABLE(demo2 demo2.cpp) 11 | TARGET_LINK_LIBRARIES(demo2 ${Boost_LIBRARIES}) -------------------------------------------------------------------------------- /debian/tests/srcs/log/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project(Boost CXX) 2 | cmake_minimum_required(VERSION 3.0) 3 | 4 | FIND_PACKAGE(Boost COMPONENTS log log_setup REQUIRED) 5 | INCLUDE_DIRECTORIES (${Boost_INCLUDE_DIRS}) 6 | 7 | ADD_EXECUTABLE(demo1 demo1.cpp) 8 | TARGET_LINK_LIBRARIES(demo1 ${Boost_LIBRARIES}) 9 | 10 | ADD_EXECUTABLE(demo2 demo2.cpp) 11 | TARGET_LINK_LIBRARIES(demo2 ${Boost_LIBRARIES}) -------------------------------------------------------------------------------- /debian/tests/srcs/signals/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project(Boost CXX) 2 | cmake_minimum_required(VERSION 3.0) 3 | 4 | FIND_PACKAGE(Boost COMPONENTS signals REQUIRED) 5 | INCLUDE_DIRECTORIES (${Boost_INCLUDE_DIRS}) 6 | 7 | ADD_EXECUTABLE(demo1 demo1.cpp) 8 | TARGET_LINK_LIBRARIES(demo1 ${Boost_LIBRARIES}) 9 | 10 | ADD_EXECUTABLE(demo2 demo2.cpp) 11 | TARGET_LINK_LIBRARIES(demo2 ${Boost_LIBRARIES}) -------------------------------------------------------------------------------- /debian/tests/srcs/filesystem/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project(Boost CXX) 2 | cmake_minimum_required(VERSION 3.0) 3 | 4 | FIND_PACKAGE(Boost COMPONENTS filesystem REQUIRED) 5 | INCLUDE_DIRECTORIES (${Boost_INCLUDE_DIRS}) 6 | 7 | ADD_EXECUTABLE(demo1 demo1.cpp) 8 | TARGET_LINK_LIBRARIES(demo1 ${Boost_LIBRARIES}) 9 | 10 | ADD_EXECUTABLE(demo2 demo2.cpp) 11 | TARGET_LINK_LIBRARIES(demo2 ${Boost_LIBRARIES}) -------------------------------------------------------------------------------- /debian/tests/srcs/iostreams/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project(Boost CXX) 2 | cmake_minimum_required(VERSION 3.0) 3 | 4 | FIND_PACKAGE(Boost COMPONENTS iostreams REQUIRED) 5 | INCLUDE_DIRECTORIES (${Boost_INCLUDE_DIRS}) 6 | 7 | ADD_EXECUTABLE(demo1 demo1.cpp) 8 | TARGET_LINK_LIBRARIES(demo1 ${Boost_LIBRARIES}) 9 | 10 | ADD_EXECUTABLE(demo2 demo2.cpp) 11 | TARGET_LINK_LIBRARIES(demo2 ${Boost_LIBRARIES}) -------------------------------------------------------------------------------- /debian/tests/srcs/wave/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project(Boost CXX) 2 | cmake_minimum_required(VERSION 3.0) 3 | 4 | FIND_PACKAGE(Boost COMPONENTS wave thread REQUIRED) 5 | INCLUDE_DIRECTORIES (${Boost_INCLUDE_DIRS}) 6 | 7 | ADD_EXECUTABLE(demo1 demo1.cpp) 8 | TARGET_LINK_LIBRARIES(demo1 ${Boost_LIBRARIES}) 9 | 10 | ADD_EXECUTABLE(demo2 demo2.cpp) 11 | TARGET_LINK_LIBRARIES(demo2 ${Boost_LIBRARIES}) 12 | -------------------------------------------------------------------------------- /debian/tests/srcs/chrono/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project(Boost CXX) 2 | cmake_minimum_required(VERSION 3.0) 3 | 4 | FIND_PACKAGE(Boost COMPONENTS chrono system REQUIRED) 5 | INCLUDE_DIRECTORIES (${Boost_INCLUDE_DIRS}) 6 | 7 | ADD_EXECUTABLE(demo1 demo1.cpp) 8 | TARGET_LINK_LIBRARIES(demo1 ${Boost_LIBRARIES}) 9 | 10 | ADD_EXECUTABLE(demo2 demo2.cpp) 11 | TARGET_LINK_LIBRARIES(demo2 ${Boost_LIBRARIES}) 12 | -------------------------------------------------------------------------------- /debian/tests/srcs/datetime/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project(Boost CXX) 2 | cmake_minimum_required(VERSION 3.0) 3 | 4 | FIND_PACKAGE(Boost COMPONENTS date_time REQUIRED) 5 | INCLUDE_DIRECTORIES (${Boost_INCLUDE_DIRS}) 6 | 7 | ADD_EXECUTABLE(demo1 demo1.cpp) 8 | TARGET_LINK_LIBRARIES(demo1 ${Boost_LIBRARIES}) 9 | 10 | ADD_EXECUTABLE(demo2 demo2.cpp) 11 | TARGET_LINK_LIBRARIES(demo2 ${Boost_LIBRARIES}) 12 | -------------------------------------------------------------------------------- /debian/tests/srcs/exception/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project(Boost CXX) 2 | cmake_minimum_required(VERSION 3.0) 3 | 4 | FIND_PACKAGE(Boost COMPONENTS exception REQUIRED) 5 | INCLUDE_DIRECTORIES (${Boost_INCLUDE_DIRS}) 6 | 7 | ADD_EXECUTABLE(demo1 demo1.cpp) 8 | TARGET_LINK_LIBRARIES(demo1 ${Boost_LIBRARIES}) 9 | 10 | ADD_EXECUTABLE(demo2 demo2.cpp) 11 | TARGET_LINK_LIBRARIES(demo2 ${Boost_LIBRARIES}) 12 | -------------------------------------------------------------------------------- /debian/tests/srcs/test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project(Boost CXX) 2 | cmake_minimum_required(VERSION 3.0) 3 | 4 | FIND_PACKAGE(Boost COMPONENTS unit_test_framework REQUIRED) 5 | INCLUDE_DIRECTORIES (${Boost_INCLUDE_DIRS}) 6 | 7 | ADD_EXECUTABLE(demo1 demo1.cpp) 8 | TARGET_LINK_LIBRARIES(demo1 ${Boost_LIBRARIES}) 9 | 10 | ADD_EXECUTABLE(demo2 demo2.cpp) 11 | TARGET_LINK_LIBRARIES(demo2 ${Boost_LIBRARIES}) -------------------------------------------------------------------------------- /debian/tests/srcs/thread/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project(Boost CXX) 2 | cmake_minimum_required(VERSION 3.0) 3 | 4 | FIND_PACKAGE(Boost COMPONENTS thread chrono REQUIRED) 5 | INCLUDE_DIRECTORIES (${Boost_INCLUDE_DIRS}) 6 | 7 | ADD_EXECUTABLE(demo1 demo1.cpp) 8 | TARGET_LINK_LIBRARIES(demo1 ${Boost_LIBRARIES}) 9 | 10 | ADD_EXECUTABLE(demo2 demo2.cpp) 11 | TARGET_LINK_LIBRARIES(demo2 ${Boost_LIBRARIES}) 12 | -------------------------------------------------------------------------------- /debian/tests/srcs/type-erasure/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project(Boost CXX) 2 | cmake_minimum_required(VERSION 3.0) 3 | 4 | FIND_PACKAGE(Boost COMPONENTS type_erasure REQUIRED) 5 | INCLUDE_DIRECTORIES (${Boost_INCLUDE_DIRS}) 6 | 7 | ADD_EXECUTABLE(demo1 demo1.cpp) 8 | TARGET_LINK_LIBRARIES(demo1 ${Boost_LIBRARIES}) 9 | 10 | ADD_EXECUTABLE(demo2 demo2.cpp) 11 | TARGET_LINK_LIBRARIES(demo2 ${Boost_LIBRARIES}) -------------------------------------------------------------------------------- /debian/tests/srcs/coroutine/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project(Boost CXX) 2 | cmake_minimum_required(VERSION 3.0) 3 | 4 | FIND_PACKAGE(Boost COMPONENTS coroutine context REQUIRED) 5 | INCLUDE_DIRECTORIES (${Boost_INCLUDE_DIRS}) 6 | 7 | ADD_EXECUTABLE(demo1 demo1.cpp) 8 | TARGET_LINK_LIBRARIES(demo1 ${Boost_LIBRARIES}) 9 | 10 | ADD_EXECUTABLE(demo2 demo2.cpp) 11 | TARGET_LINK_LIBRARIES(demo2 ${Boost_LIBRARIES}) 12 | -------------------------------------------------------------------------------- /debian/tests/srcs/mpi-python/demo2.py: -------------------------------------------------------------------------------- 1 | # https://www.boost.org/doc/libs/1_67_0/doc/html/mpi/tutorial.html#mpi.python 2 | 3 | import boost.mpi as mpi 4 | 5 | if mpi.world.rank == 0: 6 | mpi.world.send(1, 0, 'Hello') 7 | msg = mpi.world.recv(1, 1) 8 | print(msg, '!') 9 | else: 10 | msg = mpi.world.recv(0, 0) 11 | print((msg + ', '), end=' ') 12 | mpi.world.send(0, 1, 'world') 13 | -------------------------------------------------------------------------------- /debian/tests/srcs/serialization/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project(Boost CXX) 2 | cmake_minimum_required(VERSION 3.0) 3 | 4 | FIND_PACKAGE(Boost COMPONENTS serialization random REQUIRED) 5 | INCLUDE_DIRECTORIES (${Boost_INCLUDE_DIRS}) 6 | 7 | ADD_EXECUTABLE(demo1 demo1.cpp) 8 | TARGET_LINK_LIBRARIES(demo1 ${Boost_LIBRARIES}) 9 | 10 | ADD_EXECUTABLE(demo2 demo2.cpp) 11 | TARGET_LINK_LIBRARIES(demo2 ${Boost_LIBRARIES}) -------------------------------------------------------------------------------- /debian/tests/srcs/mpi/demo1.cpp: -------------------------------------------------------------------------------- 1 | // https://www.boost.org/doc/libs/1_67_0/doc/html/mpi/tutorial.html 2 | #include 3 | #include 4 | #include 5 | namespace mpi = boost::mpi; 6 | 7 | int main() 8 | { 9 | mpi::environment env; 10 | mpi::communicator world; 11 | std::cout << "I am process " << world.rank() << " of " << world.size() 12 | << "." << std::endl; 13 | return 0; 14 | } -------------------------------------------------------------------------------- /debian/tests/srcs/graph/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project(Boost CXX) 2 | cmake_minimum_required(VERSION 3.0) 3 | 4 | FIND_PACKAGE(Boost COMPONENTS graph REQUIRED) 5 | INCLUDE_DIRECTORIES (${Boost_INCLUDE_DIRS}) 6 | 7 | ADD_EXECUTABLE(demo1 demo1.cpp) 8 | TARGET_LINK_LIBRARIES(demo1 ${Boost_LIBRARIES}) 9 | 10 | ADD_EXECUTABLE(demo2 demo2.cpp) 11 | TARGET_LINK_LIBRARIES(demo2 ${Boost_LIBRARIES}) 12 | 13 | ADD_EXECUTABLE(demo3 demo3.cpp) 14 | TARGET_LINK_LIBRARIES(demo3 ${Boost_LIBRARIES}) -------------------------------------------------------------------------------- /debian/tests/fiber: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # (C) 2018 Anton Gladky 3 | 4 | set -e 5 | 6 | WORKDIR=$(mktemp -d) 7 | trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM 8 | mkdir -p $WORKDIR/src 9 | mkdir -p $WORKDIR/build 10 | 11 | cp debian/tests/srcs/fiber/* $WORKDIR/src/ 12 | 13 | cd $WORKDIR/build 14 | cmake ./../src 15 | make 16 | 17 | echo "build: OK" 18 | 19 | [ -x demo1 ] 20 | ./demo1 21 | 22 | echo "run: demo1 OK" 23 | 24 | [ -x demo2 ] 25 | ./demo2 26 | 27 | echo "run: demo2 OK" 28 | -------------------------------------------------------------------------------- /debian/tests/math: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # (C) 2018 Anton Gladky 3 | 4 | set -e 5 | 6 | WORKDIR=$(mktemp -d) 7 | trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM 8 | mkdir -p $WORKDIR/src 9 | mkdir -p $WORKDIR/build 10 | 11 | cp debian/tests/srcs/math/* $WORKDIR/src/ 12 | 13 | cd $WORKDIR/build 14 | cmake ./../src 15 | make 16 | 17 | echo "build: OK" 18 | 19 | [ -x demo1 ] 20 | ./demo1 21 | 22 | echo "run: demo1 OK" 23 | 24 | [ -x demo2 ] 25 | ./demo2 26 | 27 | echo "run: demo2 OK" 28 | -------------------------------------------------------------------------------- /debian/tests/test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # (C) 2018 Anton Gladky 3 | 4 | set -e 5 | 6 | WORKDIR=$(mktemp -d) 7 | trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM 8 | mkdir -p $WORKDIR/src 9 | mkdir -p $WORKDIR/build 10 | 11 | cp debian/tests/srcs/test/* $WORKDIR/src/ 12 | 13 | cd $WORKDIR/build 14 | cmake ./../src 15 | make 16 | 17 | echo "build: OK" 18 | 19 | [ -x demo1 ] 20 | ./demo1 21 | 22 | echo "run: demo1 OK" 23 | 24 | [ -x demo2 ] 25 | ./demo2 26 | 27 | echo "run: demo2 OK" 28 | -------------------------------------------------------------------------------- /debian/tests/atomic: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # (C) 2018 Anton Gladky 3 | 4 | set -e 5 | 6 | WORKDIR=$(mktemp -d) 7 | trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM 8 | mkdir -p $WORKDIR/src 9 | mkdir -p $WORKDIR/build 10 | 11 | cp debian/tests/srcs/atomic/* $WORKDIR/src/ 12 | 13 | cd $WORKDIR/build 14 | cmake ./../src 15 | make 16 | 17 | echo "build: OK" 18 | 19 | [ -x demo1 ] 20 | ./demo1 21 | 22 | echo "run: demo1 OK" 23 | 24 | [ -x demo2 ] 25 | ./demo2 26 | 27 | echo "run: demo2 OK" 28 | -------------------------------------------------------------------------------- /debian/tests/chrono: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # (C) 2018 Anton Gladky 3 | 4 | set -e 5 | 6 | WORKDIR=$(mktemp -d) 7 | trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM 8 | mkdir -p $WORKDIR/src 9 | mkdir -p $WORKDIR/build 10 | 11 | cp debian/tests/srcs/chrono/* $WORKDIR/src/ 12 | 13 | cd $WORKDIR/build 14 | cmake ./../src 15 | make 16 | 17 | echo "build: OK" 18 | 19 | [ -x demo1 ] 20 | ./demo1 21 | 22 | echo "run: demo1 OK" 23 | 24 | [ -x demo2 ] 25 | ./demo2 26 | 27 | echo "run: demo2 OK" 28 | -------------------------------------------------------------------------------- /debian/tests/datetime: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # (C) 2018 Anton Gladky 3 | 4 | set -e 5 | 6 | WORKDIR=$(mktemp -d) 7 | trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM 8 | mkdir -p $WORKDIR/src 9 | mkdir -p $WORKDIR/build 10 | 11 | cp debian/tests/srcs/datetime/* $WORKDIR/src/ 12 | 13 | cd $WORKDIR/build 14 | cmake ./../src 15 | make 16 | 17 | echo "build: OK" 18 | 19 | [ -x demo1 ] 20 | ./demo1 21 | 22 | echo "run: demo1 OK" 23 | 24 | [ -x demo2 ] 25 | ./demo2 26 | 27 | echo "run: demo2 OK" 28 | -------------------------------------------------------------------------------- /debian/tests/locale: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # (C) 2018 Anton Gladky 3 | 4 | set -e 5 | 6 | WORKDIR=$(mktemp -d) 7 | trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM 8 | mkdir -p $WORKDIR/src 9 | mkdir -p $WORKDIR/build 10 | 11 | cp debian/tests/srcs/locale/* $WORKDIR/src/ 12 | 13 | cd $WORKDIR/build 14 | cmake ./../src 15 | make 16 | 17 | echo "build: OK" 18 | 19 | [ -x demo1 ] 20 | ./demo1 . 21 | 22 | echo "run: demo1 OK" 23 | 24 | [ -x demo2 ] 25 | ./demo2 . 26 | 27 | echo "run: demo2 OK" 28 | -------------------------------------------------------------------------------- /debian/tests/random: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # (C) 2018 Anton Gladky 3 | 4 | set -e 5 | 6 | WORKDIR=$(mktemp -d) 7 | trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM 8 | mkdir -p $WORKDIR/src 9 | mkdir -p $WORKDIR/build 10 | 11 | cp debian/tests/srcs/random/* $WORKDIR/src/ 12 | 13 | cd $WORKDIR/build 14 | cmake ./../src 15 | make 16 | 17 | echo "build: OK" 18 | 19 | [ -x demo1 ] 20 | ./demo1 21 | 22 | echo "run: demo1 OK" 23 | 24 | [ -x demo2 ] 25 | ./demo2 26 | 27 | echo "run: demo2 OK" 28 | -------------------------------------------------------------------------------- /debian/tests/signals: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # (C) 2018 Anton Gladky 3 | 4 | set -e 5 | 6 | WORKDIR=$(mktemp -d) 7 | trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM 8 | mkdir -p $WORKDIR/src 9 | mkdir -p $WORKDIR/build 10 | 11 | cp debian/tests/srcs/signals/* $WORKDIR/src/ 12 | 13 | cd $WORKDIR/build 14 | cmake ./../src 15 | make 16 | 17 | echo "build: OK" 18 | 19 | [ -x demo1 ] 20 | ./demo1 21 | 22 | echo "run: demo1 OK" 23 | 24 | [ -x demo2 ] 25 | ./demo2 26 | 27 | echo "run: demo2 OK" 28 | -------------------------------------------------------------------------------- /debian/tests/system: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # (C) 2018 Anton Gladky 3 | 4 | set -e 5 | 6 | WORKDIR=$(mktemp -d) 7 | trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM 8 | mkdir -p $WORKDIR/src 9 | mkdir -p $WORKDIR/build 10 | 11 | cp debian/tests/srcs/system/* $WORKDIR/src/ 12 | 13 | cd $WORKDIR/build 14 | cmake ./../src 15 | make 16 | 17 | echo "build: OK" 18 | 19 | [ -x demo1 ] 20 | ./demo1 21 | 22 | echo "run: demo1 OK" 23 | 24 | [ -x demo2 ] 25 | ./demo2 26 | 27 | echo "run: demo2 OK" 28 | -------------------------------------------------------------------------------- /debian/tests/thread: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # (C) 2018 Anton Gladky 3 | 4 | set -e 5 | 6 | WORKDIR=$(mktemp -d) 7 | trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM 8 | mkdir -p $WORKDIR/src 9 | mkdir -p $WORKDIR/build 10 | 11 | cp debian/tests/srcs/thread/* $WORKDIR/src/ 12 | 13 | cd $WORKDIR/build 14 | cmake ./../src 15 | make 16 | 17 | echo "build: OK" 18 | 19 | [ -x demo1 ] 20 | ./demo1 21 | 22 | echo "run: demo1 OK" 23 | 24 | [ -x demo2 ] 25 | ./demo2 26 | 27 | echo "run: demo2 OK" 28 | -------------------------------------------------------------------------------- /debian/tests/timer: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # (C) 2018 Anton Gladky 3 | 4 | set -e 5 | 6 | WORKDIR=$(mktemp -d) 7 | trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM 8 | mkdir -p $WORKDIR/src 9 | mkdir -p $WORKDIR/build 10 | 11 | cp debian/tests/srcs/timer/* $WORKDIR/src/ 12 | 13 | cd $WORKDIR/build 14 | cmake ./../src 15 | make 16 | 17 | echo "build: OK" 18 | 19 | [ -x demo1 ] 20 | ./demo1 -v ls 21 | 22 | echo "run: demo1 OK" 23 | 24 | [ -x demo2 ] 25 | ./demo2 26 | 27 | echo "run: demo2 OK" 28 | -------------------------------------------------------------------------------- /debian/tests/coroutine: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # (C) 2018 Anton Gladky 3 | 4 | set -e 5 | 6 | WORKDIR=$(mktemp -d) 7 | trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM 8 | mkdir -p $WORKDIR/src 9 | mkdir -p $WORKDIR/build 10 | 11 | cp debian/tests/srcs/coroutine/* $WORKDIR/src/ 12 | 13 | cd $WORKDIR/build 14 | cmake ./../src 15 | make 16 | 17 | echo "build: OK" 18 | 19 | [ -x demo1 ] 20 | ./demo1 21 | 22 | echo "run: demo1 OK" 23 | 24 | [ -x demo2 ] 25 | ./demo2 26 | 27 | echo "run: demo2 OK" 28 | -------------------------------------------------------------------------------- /debian/tests/exception: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # (C) 2018 Anton Gladky 3 | 4 | set -e 5 | 6 | WORKDIR=$(mktemp -d) 7 | trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM 8 | mkdir -p $WORKDIR/src 9 | mkdir -p $WORKDIR/build 10 | 11 | cp debian/tests/srcs/exception/* $WORKDIR/src/ 12 | 13 | cd $WORKDIR/build 14 | cmake ./../src 15 | make 16 | 17 | echo "build: OK" 18 | 19 | [ -x demo1 ] 20 | ./demo1 21 | 22 | echo "run: demo1 OK" 23 | 24 | [ -x demo2 ] 25 | ./demo2 26 | 27 | echo "run: demo2 OK" 28 | -------------------------------------------------------------------------------- /debian/tests/stacktrace: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # (C) 2018 Anton Gladky 3 | 4 | set -e 5 | 6 | WORKDIR=$(mktemp -d) 7 | trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM 8 | mkdir -p $WORKDIR/src 9 | mkdir -p $WORKDIR/build 10 | 11 | cp debian/tests/srcs/stacktrace/* $WORKDIR/src/ 12 | 13 | cd $WORKDIR/build 14 | cmake ./../src 15 | make 16 | 17 | echo "build: OK" 18 | 19 | [ -x demo1 ] 20 | ./demo1 21 | 22 | echo "run: demo1 OK" 23 | 24 | [ -x demo2 ] 25 | ./demo2 26 | 27 | echo "run: demo2 OK" 28 | -------------------------------------------------------------------------------- /debian/tests/filesystem: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # (C) 2018 Anton Gladky 3 | 4 | set -e 5 | 6 | WORKDIR=$(mktemp -d) 7 | trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM 8 | mkdir -p $WORKDIR/src 9 | mkdir -p $WORKDIR/build 10 | 11 | cp debian/tests/srcs/filesystem/* $WORKDIR/src/ 12 | 13 | cd $WORKDIR/build 14 | cmake ./../src 15 | make 16 | 17 | echo "build: OK" 18 | 19 | [ -x demo1 ] 20 | ./demo1 . 21 | 22 | echo "run: demo1 OK" 23 | 24 | [ -x demo2 ] 25 | ./demo2 . 26 | 27 | echo "run: demo2 OK" 28 | -------------------------------------------------------------------------------- /debian/tests/iostreams: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # (C) 2018 Anton Gladky 3 | 4 | set -e 5 | 6 | WORKDIR=$(mktemp -d) 7 | trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM 8 | mkdir -p $WORKDIR/src 9 | mkdir -p $WORKDIR/build 10 | 11 | cp debian/tests/srcs/iostreams/* $WORKDIR/src/ 12 | 13 | cd $WORKDIR/build 14 | cmake ./../src 15 | make 16 | 17 | echo "build: OK" 18 | 19 | [ -x demo1 ] 20 | ./demo1 . 21 | 22 | echo "run: demo1 OK" 23 | 24 | [ -x demo2 ] 25 | ./demo2 . 26 | 27 | echo "run: demo2 OK" 28 | -------------------------------------------------------------------------------- /debian/tests/serialization: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # (C) 2018 Anton Gladky 3 | 4 | set -e 5 | 6 | WORKDIR=$(mktemp -d) 7 | trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM 8 | mkdir -p $WORKDIR/src 9 | mkdir -p $WORKDIR/build 10 | 11 | cp debian/tests/srcs/serialization/* $WORKDIR/src/ 12 | 13 | cd $WORKDIR/build 14 | cmake ./../src 15 | make 16 | 17 | echo "build: OK" 18 | 19 | [ -x demo1 ] 20 | ./demo1 21 | 22 | echo "run: demo1 OK" 23 | 24 | [ -x demo2 ] 25 | ./demo2 26 | 27 | echo "run: demo2 OK" 28 | -------------------------------------------------------------------------------- /debian/tests/type-erasure: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # (C) 2018 Anton Gladky 3 | 4 | set -e 5 | 6 | WORKDIR=$(mktemp -d) 7 | trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM 8 | mkdir -p $WORKDIR/src 9 | mkdir -p $WORKDIR/build 10 | 11 | cp debian/tests/srcs/type-erasure/* $WORKDIR/src/ 12 | 13 | cd $WORKDIR/build 14 | cmake ./../src 15 | make 16 | 17 | echo "build: OK" 18 | 19 | [ -x demo1 ] 20 | ./demo1 21 | 22 | echo "run: demo1 OK" 23 | 24 | [ -x demo2 ] 25 | ./demo2 26 | 27 | echo "run: demo2 OK" 28 | -------------------------------------------------------------------------------- /debian/libboost-doc.README.Debian: -------------------------------------------------------------------------------- 1 | Building Boost.Python Examples 2 | ------------------------------ 3 | 4 | 1. Ensure the package libboostX.YZ-dev is installed (provides bjam). 5 | 6 | 2. Copy the contents of examples/libs/python/example elsewhere before 7 | attempting to build, since the build creates files inside the example 8 | directory. 9 | 10 | 3. Change to the directory created in step 2, then "bjam test". 11 | 12 | 13 | -- Steve M. Robbins , Thu, 11 Aug 2011 22:57:55 -0500 14 | -------------------------------------------------------------------------------- /debian/tests/log: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # (C) 2018 Anton Gladky 3 | 4 | set -e 5 | 6 | WORKDIR=$(mktemp -d) 7 | trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM 8 | mkdir -p $WORKDIR/src 9 | mkdir -p $WORKDIR/build 10 | 11 | cp debian/tests/srcs/log/* $WORKDIR/src/ 12 | 13 | cd $WORKDIR/build 14 | cmake ./../src 15 | make 16 | 17 | echo "build: OK" 18 | 19 | [ -x demo1 ] 20 | ./demo1 21 | 22 | echo "run: demo1 OK" 23 | 24 | [ -x demo2 ] 25 | ./demo2 ; ls -l ; head -10 test.log 26 | 27 | echo "run: demo2 OK" 28 | -------------------------------------------------------------------------------- /debian/patches/fix-mpi-python37.patch: -------------------------------------------------------------------------------- 1 | Index: boost_1_72_0/libs/mpi/build/__init__.py 2 | =================================================================== 3 | --- boost_1_72_0.orig/libs/mpi/build/__init__.py 4 | +++ boost_1_72_0/libs/mpi/build/__init__.py 5 | @@ -5,6 +5,8 @@ if sys.platform == 'linux2': 6 | sys.setdlopenflags(dl.RTLD_NOW|dl.RTLD_GLOBAL) 7 | import mpi 8 | sys.setdlopenflags(flags) 9 | +if sys.platform == 'linux': 10 | + from . import mpi 11 | else: 12 | import mpi 13 | 14 | -------------------------------------------------------------------------------- /debian/tests/srcs/program-options/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project(Boost CXX) 2 | cmake_minimum_required(VERSION 3.0) 3 | 4 | FIND_PACKAGE(Boost COMPONENTS program_options REQUIRED) 5 | INCLUDE_DIRECTORIES (${Boost_INCLUDE_DIRS}) 6 | 7 | ADD_EXECUTABLE(demo1 demo1.cpp) 8 | TARGET_LINK_LIBRARIES(demo1 ${Boost_LIBRARIES}) 9 | 10 | ADD_EXECUTABLE(demo2 demo2.cpp) 11 | TARGET_LINK_LIBRARIES(demo2 ${Boost_LIBRARIES}) 12 | 13 | FILE(COPY ${CMAKE_CURRENT_SOURCE_DIR}/multiple_sources.cfg 14 | DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) -------------------------------------------------------------------------------- /debian/tests/mpi-python: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # (C) 2018 Anton Gladky 3 | 4 | set -e 5 | 6 | export OMPI_MCA_plm_rsh_agent=/bin/false 7 | 8 | WORKDIR=$(mktemp -d) 9 | trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM 10 | mkdir -p $WORKDIR/src 11 | 12 | cp debian/tests/srcs/mpi-python/* $WORKDIR/src/ 13 | cd $WORKDIR/src 14 | 15 | mpirun --oversubscribe --allow-run-as-root -np 3 python3 ./demo1.py 16 | echo "run: demo1 OK" 17 | 18 | mpirun --oversubscribe --allow-run-as-root -np 2 python3 ./demo2.py 19 | echo "run: demo2 BROKEN FIXME" 20 | -------------------------------------------------------------------------------- /debian/tests/srcs/stacktrace/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project(Boost CXX) 2 | cmake_minimum_required(VERSION 3.0) 3 | 4 | 5 | # stacktrace is not included into the cmake yet 6 | # thus we need to link boost_stacktrace_basic manually 7 | FIND_PACKAGE(Boost COMPONENTS system REQUIRED) 8 | INCLUDE_DIRECTORIES (${Boost_INCLUDE_DIRS}) 9 | 10 | ADD_EXECUTABLE(demo1 demo1.cpp) 11 | TARGET_LINK_LIBRARIES(demo1 ${Boost_LIBRARIES} boost_stacktrace_basic dl) 12 | 13 | ADD_EXECUTABLE(demo2 demo2.cpp) 14 | TARGET_LINK_LIBRARIES(demo2 ${Boost_LIBRARIES}) 15 | -------------------------------------------------------------------------------- /debian/tests/wave: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # (C) 2018 Anton Gladky 3 | 4 | set -e 5 | 6 | WORKDIR=$(mktemp -d) 7 | trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM 8 | mkdir -p $WORKDIR/src 9 | mkdir -p $WORKDIR/build 10 | 11 | cp debian/tests/srcs/wave/* $WORKDIR/src/ 12 | 13 | cd $WORKDIR/build 14 | cmake ./../src 15 | make 16 | 17 | echo "build: OK" 18 | 19 | [ -x demo1 ] 20 | ./demo1 $WORKDIR/src/demo1_test.cpp 21 | 22 | echo "run: demo1 OK" 23 | 24 | [ -x demo2 ] 25 | ./demo2 $WORKDIR/src/demo1_test.cpp 26 | 27 | echo "run: demo2 OK" 28 | -------------------------------------------------------------------------------- /debian/tests/program-options: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # (C) 2018 Anton Gladky 3 | 4 | set -e 5 | 6 | WORKDIR=$(mktemp -d) 7 | trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM 8 | mkdir -p $WORKDIR/src 9 | mkdir -p $WORKDIR/build 10 | 11 | cp debian/tests/srcs/program-options/* $WORKDIR/src/ 12 | 13 | cd $WORKDIR/build 14 | cmake ./../src 15 | make 16 | 17 | echo "build: OK" 18 | 19 | [ -x demo1 ] 20 | ./demo1 --help 21 | 22 | ./demo1 --compression 2 23 | 24 | echo "run: demo1 OK" 25 | 26 | [ -x demo2 ] 27 | ./demo2 28 | 29 | echo "run: demo2 OK" 30 | -------------------------------------------------------------------------------- /debian/tests/graph: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # (C) 2018 Anton Gladky 3 | 4 | set -e 5 | 6 | WORKDIR=$(mktemp -d) 7 | trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM 8 | mkdir -p $WORKDIR/src 9 | mkdir -p $WORKDIR/build 10 | 11 | cp debian/tests/srcs/graph/* $WORKDIR/src/ 12 | 13 | cd $WORKDIR/build 14 | cmake ./../src 15 | make 16 | 17 | echo "build: OK" 18 | 19 | [ -x demo1 ] 20 | ./demo1 21 | 22 | echo "run: demo1 OK" 23 | 24 | [ -x demo2 ] 25 | ./demo2 26 | 27 | echo "run: demo2 OK" 28 | 29 | [ -x demo3 ] 30 | ./demo3 31 | 32 | echo "run: demo3 OK" 33 | -------------------------------------------------------------------------------- /debian/tests/srcs/iostreams/demo1.cpp: -------------------------------------------------------------------------------- 1 | // https://www.boost.org/doc/libs/1_67_0/libs/iostreams/doc/tutorial/container_sink.html 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | namespace io = boost::iostreams; 9 | 10 | int main() { 11 | using namespace std; 12 | 13 | string result; 14 | io::filtering_ostream out(io::back_inserter(result)); 15 | out << "Hello World!"; 16 | out.flush(); 17 | assert(result == "Hello World!"); 18 | } 19 | -------------------------------------------------------------------------------- /debian/tests/container: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # (C) 2018 Anton Gladky 3 | 4 | set -e 5 | 6 | WORKDIR=$(mktemp -d) 7 | trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM 8 | mkdir -p $WORKDIR/src 9 | mkdir -p $WORKDIR/build 10 | 11 | cp debian/tests/srcs/container/* $WORKDIR/src/ 12 | 13 | cd $WORKDIR/build 14 | cmake ./../src 15 | make 16 | 17 | echo "build: OK" 18 | 19 | [ -x demo1 ] 20 | ./demo1 21 | 22 | echo "run: demo1 OK" 23 | 24 | [ -x demo2 ] 25 | ./demo2 26 | 27 | echo "run: demo2 OK" 28 | 29 | [ -x demo3 ] 30 | ./demo3 31 | 32 | echo "run: demo3 OK" 33 | -------------------------------------------------------------------------------- /debian/tests/regex: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # (C) 2018 Anton Gladky 3 | 4 | set -e 5 | 6 | WORKDIR=$(mktemp -d) 7 | trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM 8 | mkdir -p $WORKDIR/src 9 | mkdir -p $WORKDIR/build 10 | 11 | cp debian/tests/srcs/regex/* $WORKDIR/src/ 12 | 13 | cd $WORKDIR/build 14 | cmake ./../src 15 | make 16 | 17 | echo "build: OK" 18 | 19 | [ -x demo1 ] 20 | ./demo1 $WORKDIR/src/demo1.cpp ; html2text $WORKDIR/src/demo1.cpp.htm 21 | 22 | echo "run: demo1 OK" 23 | 24 | [ -x demo2 ] 25 | ./demo2 $WORKDIR/src/demo2.cpp ; html2text $WORKDIR/src/demo2.cpp.htm 26 | 27 | echo "run: demo2 OK" 28 | -------------------------------------------------------------------------------- /debian/tests/srcs/python/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project(Boost CXX) 2 | cmake_minimum_required(VERSION 3.0) 3 | 4 | FIND_PACKAGE(Python 3 REQUIRED COMPONENTS Interpreter Development) 5 | INCLUDE_DIRECTORIES( ${Python_INCLUDE_DIRS} ) 6 | 7 | FIND_PACKAGE(Boost COMPONENTS python${Python_VERSION_MAJOR}${Python_VERSION_MINOR} REQUIRED) 8 | INCLUDE_DIRECTORIES (${Boost_INCLUDE_DIRS}) 9 | 10 | ADD_LIBRARY(demo1 SHARED demo1.cpp) 11 | TARGET_LINK_LIBRARIES(demo1 ${Boost_LIBRARIES} ${Python_LIBRARIES}) 12 | 13 | ADD_LIBRARY(demo2 SHARED demo2.cpp) 14 | TARGET_LINK_LIBRARIES(demo2 ${Boost_LIBRARIES} ${Python_LIBRARIES}) 15 | -------------------------------------------------------------------------------- /debian/tests/srcs/mpi/demo4.cpp: -------------------------------------------------------------------------------- 1 | // https://www.boost.org/doc/libs/1_67_0/doc/html/mpi/tutorial.html 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | namespace mpi = boost::mpi; 8 | 9 | int main() 10 | { 11 | mpi::environment env; 12 | mpi::communicator world; 13 | 14 | std::string value; 15 | if (world.rank() == 0) 16 | { 17 | value = "Hello, World!"; 18 | } 19 | 20 | broadcast(world, value, 0); 21 | 22 | std::cout << "Process #" << world.rank() << " says " << value 23 | << std::endl; 24 | return 0; 25 | } -------------------------------------------------------------------------------- /debian/tests/srcs/timer/demo2.cpp: -------------------------------------------------------------------------------- 1 | // boost1.67-1.67.0/libs/timer/example/auto_cpu_timer_example.cpp 2 | 3 | // auto_cpu_timer_example.cpp ------------------------------------------------------// 4 | 5 | // Copyright Beman Dawes 2006 6 | 7 | // Distributed under the Boost Software License, Version 1.0. 8 | // See http://www.boost.org/LICENSE_1_0.txt 9 | 10 | #include 11 | #include 12 | 13 | int main() 14 | { 15 | boost::timer::auto_cpu_timer t; 16 | 17 | for ( long i = 0; i < 100000000; ++i ) 18 | std::sqrt( 123.456L ); // burn some time 19 | 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /debian/tests/context: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # (C) 2018 Anton Gladky 3 | 4 | set -e 5 | 6 | WORKDIR=$(mktemp -d) 7 | trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM 8 | mkdir -p $WORKDIR/src 9 | mkdir -p $WORKDIR/build 10 | 11 | cp debian/tests/srcs/context/* $WORKDIR/src/ 12 | 13 | cd $WORKDIR/build 14 | cmake ./../src 15 | make 16 | 17 | echo "build: OK" 18 | 19 | if [ "`uname -m`" = "x86_64" ] ; then 20 | [ -x demo1 ] 21 | ./demo1 22 | 23 | echo "run: demo1 OK" 24 | else 25 | echo "run: demo1 SKIPPED (because arch is not amd64)" 26 | fi 27 | 28 | [ -x demo2 ] 29 | ./demo2 30 | 31 | echo "run: demo2 OK" 32 | -------------------------------------------------------------------------------- /debian/tests/gio/control: -------------------------------------------------------------------------------- 1 | Test-Command: debian/tests/simple_test libs/accumulators/example/main.cpp accumulators_test 2 | 3 | Test-Command: debian/tests/simple_test libs/algorithm/example/clamp_example.cpp algorithm_clamp_test 4 | 5 | Test-Command: debian/tests/simple_test libs/algorithm/example/is_palindrome_example.cpp algorithm_is_palindrome_test 6 | 7 | Test-Command: debian/tests/simple_test libs/algorithm/example/search_example.cpp algorithm_search_test 8 | 9 | Test-Command: debian/tests/simple_test debian/tests/test_align.cpp align_test 10 | 11 | Test-Command: debian/tests/simple_test debian/tests/test_any.cpp any_test 12 | -------------------------------------------------------------------------------- /debian/tests/srcs/log/demo1.cpp: -------------------------------------------------------------------------------- 1 | // https: //www.boost.org/doc/libs/1_67_0/libs/log/doc/html/log/tutorial.htm 2 | #define BOOST_LOG_DYN_LINK 1 3 | #include 4 | 5 | int main(int, char*[]) 6 | { 7 | BOOST_LOG_TRIVIAL(trace) << "A trace severity message"; 8 | BOOST_LOG_TRIVIAL(debug) << "A debug severity message"; 9 | BOOST_LOG_TRIVIAL(info) << "An informational severity message"; 10 | BOOST_LOG_TRIVIAL(warning) << "A warning severity message"; 11 | BOOST_LOG_TRIVIAL(error) << "An error severity message"; 12 | BOOST_LOG_TRIVIAL(fatal) << "A fatal severity message"; 13 | 14 | return 0; 15 | } -------------------------------------------------------------------------------- /debian/tests/srcs/context/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project(Boost CXX) 2 | cmake_minimum_required(VERSION 3.0) 3 | 4 | FIND_PACKAGE(Boost COMPONENTS context REQUIRED) 5 | INCLUDE_DIRECTORIES (${Boost_INCLUDE_DIRS}) 6 | 7 | EXECUTE_PROCESS( COMMAND uname -m COMMAND tr -d '\n' OUTPUT_VARIABLE ARCHITECTURE ) 8 | 9 | # demo1.cpp uses Intel-specific SIMD instructions, so it is disabled 10 | # on other architectures 11 | if( ${ARCHITECTURE} STREQUAL "x86_64" ) 12 | ADD_EXECUTABLE(demo1 demo1.cpp) 13 | TARGET_LINK_LIBRARIES(demo1 ${Boost_LIBRARIES}) 14 | endif() 15 | 16 | ADD_EXECUTABLE(demo2 demo2.cpp) 17 | TARGET_LINK_LIBRARIES(demo2 ${Boost_LIBRARIES}) 18 | -------------------------------------------------------------------------------- /debian/tests/srcs/graph-parallel/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project(Boost CXX) 2 | cmake_minimum_required(VERSION 3.0) 3 | 4 | FIND_PACKAGE(MPI REQUIRED) 5 | INCLUDE_DIRECTORIES(${MPI_INCLUDE_PATH}) 6 | 7 | FIND_PACKAGE(Boost COMPONENTS graph_parallel mpi system REQUIRED) 8 | INCLUDE_DIRECTORIES (${Boost_INCLUDE_DIRS}) 9 | 10 | ADD_EXECUTABLE(demo1 demo1.cpp) 11 | TARGET_LINK_LIBRARIES(demo1 ${Boost_LIBRARIES} ${MPI_LIBRARIES}) 12 | 13 | ADD_EXECUTABLE(demo2 demo2.cpp) 14 | TARGET_LINK_LIBRARIES(demo2 ${Boost_LIBRARIES} ${MPI_LIBRARIES}) 15 | 16 | FILE(COPY ${CMAKE_CURRENT_SOURCE_DIR}/weighted_graph.gr 17 | DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) 18 | -------------------------------------------------------------------------------- /debian/Notes: -------------------------------------------------------------------------------- 1 | Documentation 2 | ------------- 3 | 4 | Generate the list of documentation files using wget going through 5 | localhost to get the source tree. See generate-docfiles-list.py 6 | 7 | * need to symlink .../HTML/boost to /usr/include/boost; when put 8 | the symlink into the deb, it got converted to a directory during 9 | installation; use dh_link to do it 10 | 11 | * use -Nlibboost-doc with dh_compress to inhibit compressing files in the HTML 12 | tree 13 | 14 | 15 | Examples 16 | -------- 17 | 18 | List of example directories obtained using 19 | 20 | find * -name 'example*' -type d | grep -v '/example.*/example' | sort > debian/example-files 21 | -------------------------------------------------------------------------------- /debian/tests/graph-parallel: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # (C) 2018 Anton Gladky 3 | 4 | set -e 5 | 6 | export OMPI_MCA_plm_rsh_agent=/bin/false 7 | 8 | WORKDIR=$(mktemp -d) 9 | trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM 10 | mkdir -p $WORKDIR/src 11 | mkdir -p $WORKDIR/build 12 | 13 | cp debian/tests/srcs/graph-parallel/* $WORKDIR/src/ 14 | 15 | cd $WORKDIR/build 16 | cmake ./../src 17 | make 18 | 19 | echo "build: OK" 20 | 21 | [ -x demo1 ] 22 | mpirun --oversubscribe --allow-run-as-root -np 8 ./demo1 ; ls -l 23 | cat weighted_graph-bfs.dot | /usr/bin/graph-easy 24 | 25 | echo "run: demo1 OK" 26 | 27 | [ -x demo2 ] 28 | mpirun --oversubscribe --allow-run-as-root -np 8 ./demo2 ; ls -l 29 | cat weighted_graph-dijkstra.dot | /usr/bin/graph-easy 30 | 31 | echo "run: demo2 OK" 32 | -------------------------------------------------------------------------------- /debian/libboost-doc.doc-base.in: -------------------------------------------------------------------------------- 1 | Document: boost 2 | Title: Boost C++ Libraries 3 | Author: The Boost.org collaboration 4 | Abstract: The Boost web site provides free peer-reviewed portable 5 | C++ source libraries. The emphasis is on libraries which work 6 | well with the C++ Standard Library. One goal is to establish 7 | "existing practice" and provide reference implementations so that 8 | the Boost libraries are suitable for eventual 9 | standardization. Some of the libraries have already been proposed 10 | for inclusion in the C++ Standards Committee's upcoming C++ 11 | Standard Library Technical Report. 12 | Section: Programming/C++ 13 | 14 | Format: HTML 15 | Index: /usr/share/doc/libboost@PKGVERSION@-doc/HTML/index.htm 16 | Files: /usr/share/doc/libboost@PKGVERSION@-doc/HTML/* 17 | -------------------------------------------------------------------------------- /debian/tests/srcs/mpi/demo2.cpp: -------------------------------------------------------------------------------- 1 | // https://www.boost.org/doc/libs/1_67_0/doc/html/mpi/tutorial.html 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | namespace mpi = boost::mpi; 8 | 9 | int main() 10 | { 11 | mpi::environment env; 12 | mpi::communicator world; 13 | 14 | if (world.rank() == 0) 15 | { 16 | world.send(1, 0, std::string("Hello")); 17 | std::string msg; 18 | world.recv(1, 1, msg); 19 | std::cout << msg << "!" << std::endl; 20 | } 21 | else 22 | { 23 | std::string msg; 24 | world.recv(0, 0, msg); 25 | std::cout << msg << ", "; 26 | std::cout.flush(); 27 | world.send(0, 1, std::string("world")); 28 | } 29 | 30 | return 0; 31 | } 32 | -------------------------------------------------------------------------------- /debian/tests/python: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # (C) 2018 Anton Gladky 3 | 4 | set -e 5 | 6 | WORKDIR=$(mktemp -d) 7 | trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM 8 | mkdir -p $WORKDIR/src 9 | mkdir -p $WORKDIR/build 10 | 11 | cp debian/tests/srcs/python/* $WORKDIR/src/ 12 | 13 | cd $WORKDIR/build 14 | cmake ./../src 15 | make 16 | 17 | echo "build: OK" 18 | 19 | ls 20 | 21 | [ -x libdemo1.so ] 22 | python3 -c "import libdemo1 ; print(libdemo1.greet())" 23 | 24 | echo "run: demo1 OK" 25 | 26 | [ -x libdemo2.so ] 27 | python3 -c "\ 28 | import libdemo2 ;\ 29 | planet = libdemo2.World() ;\ 30 | planet.set('howdy') ;\ 31 | print(planet.greet());\ 32 | x = libdemo2.Var('pi') ;\ 33 | x.value = 3.14 ;\ 34 | print (x.name, 'is around', x.value); \ 35 | print ('enum values are: ', libdemo2.Enum.values) \ 36 | " 37 | 38 | echo "run: demo2 OK" 39 | -------------------------------------------------------------------------------- /debian/tests/srcs/exception/demo2.cpp: -------------------------------------------------------------------------------- 1 | // boost1.67-1.67.0/libs/exception/example/logging.cpp 2 | 3 | //Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. 4 | 5 | //Distributed under the Boost Software License, Version 1.0. (See accompanying 6 | //file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 7 | 8 | //This example shows how to print all data contained in a boost::exception. 9 | 10 | #include 11 | #include 12 | 13 | void f() 14 | { 15 | throw boost::enable_error_info(std::range_error("Index out of range")); 16 | }; //throws unknown types that derive from boost::exception. 17 | 18 | void g() 19 | { 20 | try 21 | { 22 | f(); 23 | } 24 | catch ( 25 | boost::exception &e) 26 | { 27 | std::cerr << diagnostic_information(e); 28 | } 29 | } 30 | 31 | int main() 32 | { 33 | g(); 34 | } -------------------------------------------------------------------------------- /debian/tests/srcs/atomic/demo1.cpp: -------------------------------------------------------------------------------- 1 | // https://www.boost.org/doc/libs/1_67_0/doc/html/atomic/usage_examples.html#boost_atomic.usage_examples.example_reference_counters 2 | 3 | #include 4 | #include 5 | 6 | class X 7 | { 8 | public: 9 | typedef boost::intrusive_ptr pointer; 10 | X() : refcount_(0) {} 11 | 12 | private: 13 | mutable boost::atomic refcount_; 14 | friend void intrusive_ptr_add_ref(const X *x) 15 | { 16 | x->refcount_.fetch_add(1, boost::memory_order_relaxed); 17 | } 18 | friend void intrusive_ptr_release(const X *x) 19 | { 20 | if (x->refcount_.fetch_sub(1, boost::memory_order_release) == 1) 21 | { 22 | boost::atomic_thread_fence(boost::memory_order_acquire); 23 | delete x; 24 | } 25 | } 26 | }; 27 | 28 | int main() 29 | { 30 | X::pointer x = new X; 31 | } -------------------------------------------------------------------------------- /debian/tests/srcs/mpi/demo6.cpp: -------------------------------------------------------------------------------- 1 | // https://www.boost.org/doc/libs/1_67_0/doc/html/mpi/tutorial.html 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | namespace mpi = boost::mpi; 9 | 10 | int main() 11 | { 12 | mpi::environment env; 13 | mpi::communicator world; 14 | 15 | std::string names[10] = {"zero ", "one ", "two ", "three ", 16 | "four ", "five ", "six ", "seven ", 17 | "eight ", "nine "}; 18 | 19 | std::string result; 20 | reduce(world, 21 | world.rank() < 10 ? names[world.rank()] 22 | : std::string("many "), 23 | result, std::plus(), 0); 24 | 25 | if (world.rank() == 0) 26 | std::cout << "The result is " << result << std::endl; 27 | 28 | return 0; 29 | } 30 | -------------------------------------------------------------------------------- /debian/tests/srcs/mpi/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project(Boost CXX) 2 | cmake_minimum_required(VERSION 3.0) 3 | 4 | FIND_PACKAGE(MPI REQUIRED) 5 | INCLUDE_DIRECTORIES(${MPI_INCLUDE_PATH}) 6 | 7 | FIND_PACKAGE(Boost COMPONENTS mpi REQUIRED) 8 | INCLUDE_DIRECTORIES (${Boost_INCLUDE_DIRS}) 9 | 10 | ADD_EXECUTABLE(demo1 demo1.cpp) 11 | TARGET_LINK_LIBRARIES(demo1 ${Boost_LIBRARIES} ${MPI_LIBRARIES}) 12 | 13 | ADD_EXECUTABLE(demo2 demo2.cpp) 14 | TARGET_LINK_LIBRARIES(demo2 ${Boost_LIBRARIES} ${MPI_LIBRARIES}) 15 | 16 | ADD_EXECUTABLE(demo3 demo3.cpp) 17 | TARGET_LINK_LIBRARIES(demo3 ${Boost_LIBRARIES} ${MPI_LIBRARIES}) 18 | 19 | ADD_EXECUTABLE(demo4 demo4.cpp) 20 | TARGET_LINK_LIBRARIES(demo4 ${Boost_LIBRARIES} ${MPI_LIBRARIES}) 21 | 22 | ADD_EXECUTABLE(demo5 demo5.cpp) 23 | TARGET_LINK_LIBRARIES(demo5 ${Boost_LIBRARIES} ${MPI_LIBRARIES}) 24 | 25 | ADD_EXECUTABLE(demo6 demo6.cpp) 26 | TARGET_LINK_LIBRARIES(demo6 ${Boost_LIBRARIES} ${MPI_LIBRARIES}) 27 | -------------------------------------------------------------------------------- /debian/tests/list_of_packages: -------------------------------------------------------------------------------- 1 | # List of packages with autopkgtests (marked with *) 2 | * libboost-atomic-dev 3 | * libboost-chrono-dev 4 | * libboost-container-dev 5 | * libboost-context-dev 6 | * libboost-coroutine-dev 7 | * libboost-date-time-dev 8 | * libboost-exception-dev 9 | * libboost-fiber-dev 10 | * libboost-filesystem-dev 11 | * libboost-graph-dev 12 | * libboost-graph-parallel-dev 13 | * libboost-iostreams-dev 14 | * libboost-locale-dev 15 | * libboost-log-dev 16 | * libboost-math-dev 17 | * libboost-mpi-dev 18 | * libboost-mpi-python-dev 19 | libboost-numpy-dev 20 | * libboost-program-options-dev 21 | * libboost-python-dev 22 | * libboost-random-dev 23 | * libboost-regex-dev 24 | * libboost-serialization-dev 25 | * libboost-signals-dev 26 | * libboost-stacktrace-dev 27 | * libboost-system-dev 28 | * libboost-test-dev 29 | * libboost-thread-dev 30 | * libboost-timer-dev 31 | libboost-tools-dev 32 | * libboost-type-erasure-dev 33 | * libboost-wave-dev 34 | -------------------------------------------------------------------------------- /debian/tests/srcs/mpi/demo5.cpp: -------------------------------------------------------------------------------- 1 | // https://www.boost.org/doc/libs/1_67_0/doc/html/mpi/tutorial.html 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | namespace mpi = boost::mpi; 10 | 11 | int main(int argc, char *argv[]) 12 | { 13 | mpi::environment env(argc, argv); 14 | mpi::communicator world; 15 | 16 | std::srand(time(0) + world.rank()); 17 | std::vector all; 18 | int mine = -1; 19 | if (world.rank() == 0) 20 | { 21 | all.resize(world.size()); 22 | std::generate(all.begin(), all.end(), std::rand); 23 | } 24 | mpi::scatter(world, all, mine, 0); 25 | for (int r = 0; r < world.size(); ++r) 26 | { 27 | world.barrier(); 28 | if (r == world.rank()) 29 | { 30 | std::cout << "Rank " << r << " got " << mine << '\n'; 31 | } 32 | } 33 | return 0; 34 | } 35 | -------------------------------------------------------------------------------- /debian/tests/srcs/python/demo2.cpp: -------------------------------------------------------------------------------- 1 | // https://www.boost.org/doc/libs/1_67_0/libs/python/doc/html/tutorial/tutorial/exposing.html 2 | #include 3 | 4 | struct World 5 | { 6 | void set(std::string msg) { this->msg = msg; } 7 | std::string greet() { return msg; } 8 | std::string msg; 9 | }; 10 | 11 | struct Var 12 | { 13 | Var(std::string name) : name(name), value() {} 14 | std::string const name; 15 | float value; 16 | }; 17 | 18 | enum class Enum { VALUE_A, VALUE_B}; 19 | 20 | #include 21 | using namespace boost::python; 22 | 23 | BOOST_PYTHON_MODULE(libdemo2) 24 | { 25 | class_("World").def("greet", &World::greet).def("set", &World::set); 26 | class_("Var", init()) 27 | .def_readonly("name", &Var::name) 28 | .def_readwrite("value", &Var::value); 29 | enum_("Enum") 30 | .value("VALUE_A", Enum::VALUE_A) 31 | .value("VALUE_B", Enum::VALUE_B) 32 | ; 33 | } 34 | -------------------------------------------------------------------------------- /debian/tests/srcs/mpi/demo3.cpp: -------------------------------------------------------------------------------- 1 | // https://www.boost.org/doc/libs/1_67_0/doc/html/mpi/tutorial.html 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | namespace mpi = boost::mpi; 8 | 9 | int main() 10 | { 11 | mpi::environment env; 12 | mpi::communicator world; 13 | 14 | if (world.rank() == 0) 15 | { 16 | mpi::request reqs[2]; 17 | std::string msg, out_msg = "Hello"; 18 | reqs[0] = world.isend(1, 0, out_msg); 19 | reqs[1] = world.irecv(1, 1, msg); 20 | mpi::wait_all(reqs, reqs + 2); 21 | std::cout << msg << "!" << std::endl; 22 | } 23 | else 24 | { 25 | mpi::request reqs[2]; 26 | std::string msg, out_msg = "world"; 27 | reqs[0] = world.isend(0, 1, out_msg); 28 | reqs[1] = world.irecv(0, 0, msg); 29 | mpi::wait_all(reqs, reqs + 2); 30 | std::cout << msg << ", "; 31 | } 32 | 33 | return 0; 34 | } 35 | -------------------------------------------------------------------------------- /debian/patches/15.patch: -------------------------------------------------------------------------------- 1 | From d87190a3b1ea23d6d684b21751e6f65927e6083f Mon Sep 17 00:00:00 2001 2 | From: Evan Lenz 3 | Date: Tue, 23 Aug 2022 10:37:15 -0700 4 | Subject: [PATCH] Remove template rule conflict for text nodesa 5 | Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1016321 6 | 7 | 8 | fix https://github.com/boostorg/boostbook/issues/14 9 | --- 10 | xsl/annotation.xsl | 2 +- 11 | 1 file changed, 1 insertion(+), 1 deletion(-) 12 | 13 | Index: boost1.80-1.80.0/tools/boostbook/xsl/annotation.xsl 14 | =================================================================== 15 | --- boost1.80-1.80.0.orig/tools/boostbook/xsl/annotation.xsl 16 | +++ boost1.80-1.80.0/tools/boostbook/xsl/annotation.xsl 17 | @@ -426,7 +426,7 @@ 18 | 19 | 20 | 21 | - 22 | + 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /debian/tests/srcs/stacktrace/demo1.cpp: -------------------------------------------------------------------------------- 1 | // boost1.67-1.67.0/libs/stacktrace/example/debug_function.cpp 2 | // Copyright Antony Polukhin, 2016-2018. 3 | // 4 | // Distributed under the Boost Software License, Version 1.0. (See 5 | // accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | 8 | //[getting_started_debug_function 9 | #include // ::signal 10 | #include 11 | #include // std::cerr 12 | #include // std::exit 13 | 14 | void print_signal_handler_and_exit() { 15 | typedef void(*function_t)(int); 16 | 17 | function_t old_signal_function = ::signal(SIGSEGV, SIG_DFL); 18 | boost::stacktrace::frame f(old_signal_function); 19 | std::cout << f << std::endl; 20 | std::exit(0); 21 | } 22 | //] 23 | 24 | 25 | void my_signal_handler(int /*signum*/) { 26 | std::exit(1); 27 | } 28 | 29 | int main() { 30 | ::signal(SIGSEGV, &my_signal_handler); 31 | print_signal_handler_and_exit(); 32 | } 33 | 34 | 35 | -------------------------------------------------------------------------------- /debian/tests/srcs/context/demo2.cpp: -------------------------------------------------------------------------------- 1 | 2 | // Copyright Oliver Kowalke 2016. 3 | // Distributed under the Boost Software License, Version 1.0. 4 | // (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt) 6 | 7 | #include 8 | #include 9 | #include 10 | 11 | #include 12 | 13 | namespace ctx = boost::context; 14 | 15 | int main() { 16 | int a; 17 | ctx::fiber f{ 18 | [&a](ctx::fiber && f){ 19 | a=0; 20 | int b=1; 21 | for(;;){ 22 | f = std::move( f).resume(); 23 | int next=a+b; 24 | a=b; 25 | b=next; 26 | } 27 | return std::move( f); 28 | }}; 29 | for ( int j = 0; j < 10; ++j) { 30 | f = std::move( f).resume(); 31 | std::cout << a << " "; 32 | } 33 | std::cout << std::endl; 34 | std::cout << "main: done" << std::endl; 35 | return EXIT_SUCCESS; 36 | } 37 | -------------------------------------------------------------------------------- /debian/tests/srcs/context/demo1.cpp: -------------------------------------------------------------------------------- 1 | 2 | // Copyright Oliver Kowalke 2016. 3 | // Distributed under the Boost Software License, Version 1.0. 4 | // (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt) 6 | 7 | #include 8 | #include 9 | #include 10 | 11 | #include 12 | 13 | namespace ctx = boost::context; 14 | 15 | int main() { 16 | int a; 17 | ctx::continuation c=ctx::callcc( 18 | [&a](ctx::continuation && c){ 19 | a=0; 20 | int b=1; 21 | for(;;){ 22 | c=c.resume(); 23 | int next=a+b; 24 | a=b; 25 | b=next; 26 | } 27 | return std::move( c); 28 | }); 29 | for ( int j = 0; j < 10; ++j) { 30 | std::cout << a << " "; 31 | c=c.resume(); 32 | } 33 | std::cout << std::endl; 34 | std::cout << "main: done" << std::endl; 35 | return EXIT_SUCCESS; 36 | } 37 | -------------------------------------------------------------------------------- /debian/tests/srcs/coroutine/demo1.cpp: -------------------------------------------------------------------------------- 1 | // boost1.67-1.67.0/libs/coroutine2/example/fibonacci.cpp 2 | 3 | // Copyright Oliver Kowalke 2014. 4 | // Distributed under the Boost Software License, Version 1.0. 5 | // (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | 8 | #include 9 | #include 10 | 11 | #include 12 | 13 | int main() { 14 | boost::coroutines2::coroutine< int >::pull_type source( 15 | []( boost::coroutines2::coroutine< int >::push_type & sink) { 16 | int first = 1, second = 1; 17 | sink( first); 18 | sink( second); 19 | for ( int i = 0; i < 8; ++i) { 20 | int third = first + second; 21 | first = second; 22 | second = third; 23 | sink( third); 24 | } 25 | }); 26 | for ( auto i : source) { 27 | std::cout << i << " "; 28 | } 29 | std::cout << "\nDone" << std::endl; 30 | return EXIT_SUCCESS; 31 | } 32 | -------------------------------------------------------------------------------- /debian/tests/mpi: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # (C) 2018 Anton Gladky 3 | 4 | set -e 5 | 6 | export OMPI_MCA_plm_rsh_agent=/bin/false 7 | 8 | WORKDIR=$(mktemp -d) 9 | trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM 10 | mkdir -p $WORKDIR/src 11 | mkdir -p $WORKDIR/build 12 | 13 | cp debian/tests/srcs/mpi/* $WORKDIR/src/ 14 | 15 | cd $WORKDIR/build 16 | cmake ./../src 17 | make 18 | 19 | echo "build: OK" 20 | 21 | [ -x demo1 ] 22 | mpirun --oversubscribe --allow-run-as-root -np 8 ./demo1 23 | 24 | echo "run: demo1 OK" 25 | 26 | [ -x demo2 ] 27 | mpirun --oversubscribe --allow-run-as-root -np 2 ./demo2 28 | 29 | echo "run: demo2 OK" 30 | 31 | [ -x demo3 ] 32 | mpirun --oversubscribe --allow-run-as-root -np 2 ./demo3 33 | 34 | echo "run: demo3 OK" 35 | 36 | [ -x demo4 ] 37 | mpirun --oversubscribe --allow-run-as-root -np 3 ./demo4 38 | 39 | echo "run: demo4 OK" 40 | 41 | [ -x demo5 ] 42 | mpirun --oversubscribe --allow-run-as-root -np 3 ./demo5 43 | 44 | echo "run: demo5 OK" 45 | 46 | [ -x demo6 ] 47 | mpirun --oversubscribe --allow-run-as-root -np 3 ./demo6 48 | 49 | echo "run: demo6 OK" 50 | -------------------------------------------------------------------------------- /debian/tests/srcs/system/demo1.cpp: -------------------------------------------------------------------------------- 1 | // boost1.67-1.67.0/libs/system/test/quick.cpp 2 | 3 | // Copyright 2017 Peter Dimov. 4 | // 5 | // Distributed under the Boost Software License, Version 1.0. 6 | // 7 | // See accompanying file LICENSE_1_0.txt or copy at 8 | // http://www.boost.org/LICENSE_1_0.txt 9 | 10 | // See library home page at http://www.boost.org/libs/system 11 | 12 | #include 13 | #include 14 | #include 15 | 16 | int main() 17 | { 18 | boost::system::error_category const & bt = boost::system::generic_category(); 19 | 20 | int ev = ENOENT; 21 | 22 | boost::system::error_code bc( ev, bt ); 23 | 24 | BOOST_TEST_EQ( bc.value(), ev ); 25 | BOOST_TEST_EQ( &bc.category(), &bt ); 26 | 27 | boost::system::error_condition bn = bt.default_error_condition( ev ); 28 | 29 | BOOST_TEST_EQ( bn.value(), ev ); 30 | BOOST_TEST_EQ( &bn.category(), &bt ); 31 | 32 | BOOST_TEST( bt.equivalent( ev, bn ) ); 33 | 34 | BOOST_TEST( bc == bn ); 35 | 36 | return boost::report_errors(); 37 | } 38 | -------------------------------------------------------------------------------- /debian/tests/gio/test_align.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | 5 | #include 6 | #include 7 | 8 | using namespace std; 9 | using namespace boost::multiprecision; 10 | 11 | int main(int, char*[]) { 12 | int alignment = 64; 13 | int size = 16; 14 | 15 | void* storage = boost::alignment::aligned_alloc(alignment, size); 16 | boost::alignment::aligned_free(storage); 17 | 18 | std::vector > vector1; 19 | std::vector > vector2; 20 | 21 | double* pointer = reinterpret_cast< double* >(boost::alignment::aligned_alloc(alignment, sizeof(double))); 22 | assert(boost::alignment::is_aligned(pointer, alignment)); 23 | std::unique_ptr unique(pointer); 24 | 25 | std::cout << "Alignement of int128_t is: " << boost::alignment::alignment_of::value << std::endl; 26 | std::cout << "Alignement of int128_t is: " << boost::alignment::alignment_of_v << std::endl; 27 | 28 | return 0; 29 | } 30 | -------------------------------------------------------------------------------- /debian/tests/srcs/signals/demo1.cpp: -------------------------------------------------------------------------------- 1 | // boost1.67-1.67.0/libs/signals2/example/hello_world_multi_slot.cpp 2 | 3 | // Multiple slot hello world example for Boost.Signals2 4 | // Copyright Douglas Gregor 2001-2004. 5 | // Copyright Frank Mori Hess 2009. 6 | // 7 | // Use, modification and 8 | // distribution is subject to the Boost Software License, Version 9 | // 1.0. (See accompanying file LICENSE_1_0.txt or copy at 10 | // http://www.boost.org/LICENSE_1_0.txt) 11 | // For more information, see http://www.boost.org 12 | 13 | #include 14 | #include 15 | 16 | //[ hello_def_code_snippet 17 | struct Hello 18 | { 19 | void operator()() const 20 | { 21 | std::cout << "Hello"; 22 | } 23 | }; 24 | //] 25 | 26 | //[ world_def_code_snippet 27 | struct World 28 | { 29 | void operator()() const 30 | { 31 | std::cout << ", World!" << std::endl; 32 | } 33 | }; 34 | //] 35 | 36 | int main() 37 | { 38 | //[ hello_world_multi_code_snippet 39 | boost::signals2::signal sig; 40 | 41 | sig.connect(Hello()); 42 | sig.connect(World()); 43 | 44 | sig(); 45 | //] 46 | 47 | return 0; 48 | } 49 | 50 | -------------------------------------------------------------------------------- /debian/tests/srcs/iostreams/demo2.cpp: -------------------------------------------------------------------------------- 1 | // boost1.67-1.67.0/libs/iostreams/example/container_device_example.cpp 2 | 3 | // (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) 4 | // (C) Copyright 2005-2007 Jonathan Turkanis 5 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 6 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) 7 | 8 | // See http://www.boost.org/libs/iostreams for documentation. 9 | 10 | #include 11 | #include 12 | #include 13 | #include // ios_base::beg. 14 | #include "container_device.hpp" 15 | 16 | namespace io = boost::iostreams; 17 | namespace ex = boost::iostreams::example; 18 | 19 | int main() 20 | { 21 | using namespace std; 22 | typedef ex::container_device string_device; 23 | 24 | string one, two; 25 | io::stream io(one); 26 | io << "Hello World!"; 27 | io.flush(); 28 | io.seekg(0, BOOST_IOS::beg); 29 | getline(io, two); 30 | assert(one == "Hello World!"); 31 | assert(two == "Hello World!"); 32 | } 33 | -------------------------------------------------------------------------------- /debian/tests/srcs/container/demo2.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // (C) Copyright Ion Gaztanaga 2009-2013. Distributed under the Boost 4 | // Software License, Version 1.0. (See accompanying file 5 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // See http://www.boost.org/libs/container for documentation. 8 | // 9 | ////////////////////////////////////////////////////////////////////////////// 10 | 11 | //[doc_emplace 12 | #include 13 | #include 14 | 15 | //Non-copyable and non-movable class 16 | class non_copy_movable 17 | { 18 | non_copy_movable(const non_copy_movable &); 19 | non_copy_movable& operator=(const non_copy_movable &); 20 | 21 | public: 22 | non_copy_movable(int = 0) {} 23 | }; 24 | 25 | int main () 26 | { 27 | using namespace boost::container; 28 | 29 | //Store non-copyable and non-movable objects in a list 30 | list l; 31 | non_copy_movable ncm; 32 | 33 | //A new element will be built calling non_copy_movable(int) constructor 34 | l.emplace(l.begin(), 0); 35 | assert(l.size() == 1); 36 | 37 | //A new element will be value initialized 38 | l.emplace(l.begin()); 39 | assert(l.size() == 2); 40 | return 0; 41 | } 42 | //] 43 | -------------------------------------------------------------------------------- /debian/tests/srcs/timer/demo1.cpp: -------------------------------------------------------------------------------- 1 | // boost1.67-1.67.0/libs/timer/example/timer.cpp 2 | 3 | // timex: timed execution program ------------------------------------------// 4 | 5 | // Copyright Beman Dawes 2007 6 | 7 | // Distributed under the Boost Software License, Version 1.0. 8 | // See http://www.boost.org/LICENSE_1_0.txt 9 | 10 | // See http://www.boost.org/libs/timer for documentation. 11 | 12 | #include 13 | #include 14 | #include 15 | #include 16 | 17 | int main( int argc, char * argv[] ) 18 | { 19 | if ( argc == 1 ) 20 | { 21 | std::cout << "invoke: timex [-v] command [args...]\n" 22 | " command will be executed and timings displayed\n" 23 | " -v option causes command and args to be displayed\n"; 24 | return 1; 25 | } 26 | 27 | std::string s; 28 | 29 | bool verbose = false; 30 | if ( argc > 1 && *argv[1] == '-' && *(argv[1]+1) == 'v' ) 31 | { 32 | verbose = true; 33 | ++argv; 34 | --argc; 35 | } 36 | 37 | for ( int i = 1; i < argc; ++i ) 38 | { 39 | if ( i > 1 ) s += ' '; 40 | s += argv[i]; 41 | } 42 | 43 | if ( verbose ) 44 | { std::cout << "command: \"" << s.c_str() << "\"\n"; } 45 | 46 | boost::timer::auto_cpu_timer t(" %ws elapsed wall-clock time\n"); 47 | 48 | return std::system( s.c_str() ); 49 | } 50 | -------------------------------------------------------------------------------- /debian/inspect.1: -------------------------------------------------------------------------------- 1 | .TH INSPECT "1" "July 2009" "inspect " "User Commands" 2 | .SH NAME 3 | inspect \- Boost code inspection tool 4 | .SH SYNOPSIS 5 | .B inspect 6 | [\fI-cvs\fR] [\fI-text\fR] [\fI-brief\fR] [\fIoptions\fR...] 7 | .SH DESCRIPTION 8 | It is not uncommon for various common errors or guideline violations 9 | to creep into the Boost libraries. The 10 | .B inspect 11 | program detects and 12 | reports several common problems. It can be used to scan a proposed 13 | Boost submission to identify various failures. 14 | .PP 15 | The program is run in the directory to be scanned for 16 | errors. Sub-directories are also included in the scan. 17 | .PP 18 | If the first program argument is -cvs, only files and directories in 19 | the CVS tree of the current directory are scanned. Otherwise all files 20 | and sub-directories are included in the scan. 21 | .IP 22 | Options: 23 | .HP 24 | \fB\-license\fR 25 | .HP 26 | \fB\-copyright\fR 27 | .HP 28 | \fB\-crlf\fR 29 | .HP 30 | \fB\-link\fR 31 | .HP 32 | \fB\-path_name\fR 33 | .HP 34 | \fB\-tab\fR 35 | .HP 36 | \fB\-ascii\fR 37 | .HP 38 | \fB\-minmax\fR 39 | .HP 40 | \fB\-unnamed\fR 41 | .IP 42 | The default is to have all checks on; otherwise options specify desired checks. 43 | .SH "SEE ALSO" 44 | The full documentation for 45 | .B inspect 46 | is maintained in HTML; 47 | see /usr/share/doc/libboostX.Y-doc/HTML/tools/inspect/index.html 48 | -------------------------------------------------------------------------------- /debian/tests/srcs/filesystem/demo2.cpp: -------------------------------------------------------------------------------- 1 | // https://www.boost.org/doc/libs/1_67_0/libs/filesystem/example/tut3.cpp 2 | 3 | // filesystem tut3.cpp 4 | // ---------------------------------------------------------------// 5 | 6 | // Copyright Beman Dawes 2009 7 | 8 | // Distributed under the Boost Software License, Version 1.0. 9 | // See http://www.boost.org/LICENSE_1_0.txt 10 | 11 | // Library home page: http://www.boost.org/libs/filesystem 12 | 13 | #include 14 | #include 15 | using std::cout; 16 | using namespace boost::filesystem; 17 | 18 | int main(int argc, char *argv[]) { 19 | if (argc < 2) { 20 | cout << "Usage: tut3 path\n"; 21 | return 1; 22 | } 23 | 24 | path p(argv[1]); 25 | 26 | try { 27 | if (exists(p)) { 28 | if (is_regular_file(p)) 29 | cout << p << " size is " << file_size(p) << '\n'; 30 | 31 | else if (is_directory(p)) { 32 | cout << p << " is a directory containing:\n"; 33 | 34 | for (const directory_entry &x : directory_iterator(p)) 35 | cout << " " << x.path() << '\n'; 36 | } else 37 | cout << p << " exists, but is not a regular file or directory\n"; 38 | } else 39 | cout << p << " does not exist\n"; 40 | } 41 | 42 | catch (const filesystem_error &ex) { 43 | cout << ex.what() << '\n'; 44 | } 45 | 46 | return 0; 47 | } -------------------------------------------------------------------------------- /debian/patches/116.patch: -------------------------------------------------------------------------------- 1 | From 50973dc10ea16931245ea61a00b2ce9041acc5ba Mon Sep 17 00:00:00 2001 2 | From: Stephan Bergmann 3 | Date: Wed, 4 Jan 2023 17:33:31 +0100 4 | Subject: [PATCH] Avoid boost::phoenix::placeholders::uarg1..10 ODR violations 5 | 6 | Those variables, defined in an include file, had external linkage, causing ODR 7 | violations. Make them const to implicitly give them internal linkage. 8 | --- 9 | include/boost/phoenix/stl/tuple.hpp | 2 +- 10 | 1 file changed, 1 insertion(+), 1 deletion(-) 11 | 12 | diff --git a/libs/phoenix/include/boost/phoenix/stl/tuple.hpp b/libs/phoenix/include/boost/phoenix/stl/tuple.hpp 13 | index a83014ac..7f61a402 100644 14 | --- a/libs/phoenix/include/boost/phoenix/stl/tuple.hpp 15 | +++ b/libs/phoenix/include/boost/phoenix/stl/tuple.hpp 16 | @@ -110,7 +110,7 @@ namespace boost { namespace phoenix { 17 | namespace placeholders { 18 | #define BOOST_PP_LOCAL_LIMITS (1, BOOST_PHOENIX_ARG_LIMIT) 19 | #define BOOST_PP_LOCAL_MACRO(N) \ 20 | - auto uarg##N = \ 21 | + auto const uarg##N = \ 22 | boost::phoenix::get_<(N)-1>(boost::phoenix::placeholders::arg1); 23 | #include BOOST_PP_LOCAL_ITERATE() 24 | } 25 | -------------------------------------------------------------------------------- /debian/tests/srcs/container/demo1.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // (C) Copyright Ion Gaztanaga 2013-2013. Distributed under the Boost 4 | // Software License, Version 1.0. (See accompanying file 5 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // See http://www.boost.org/libs/container for documentation. 8 | // 9 | ////////////////////////////////////////////////////////////////////////////// 10 | //[doc_custom_deque 11 | #include 12 | #include 13 | 14 | //Make sure assertions are active 15 | #ifdef NDEBUG 16 | #undef NDEBUG 17 | #endif 18 | #include 19 | 20 | int main () 21 | { 22 | using namespace boost::container; 23 | 24 | //This option specifies the desired block size for deque 25 | typedef deque_options< block_size<128u> >::type block_128_option_t; 26 | 27 | //This deque will allocate blocks of 128 elements 28 | typedef deque block_128_deque_t; 29 | assert(block_128_deque_t::get_block_size() == 128u); 30 | 31 | //This option specifies the maximum block size for deque 32 | //in bytes 33 | typedef deque_options< block_bytes<1024u> >::type block_1024_bytes_option_t; 34 | 35 | //This deque will allocate blocks of 1024 bytes 36 | typedef deque block_1024_bytes_deque_t; 37 | assert(block_1024_bytes_deque_t::get_block_size() == 1024u/sizeof(int)); 38 | 39 | return 0; 40 | } 41 | //] 42 | -------------------------------------------------------------------------------- /debian/tests/srcs/filesystem/demo1.cpp: -------------------------------------------------------------------------------- 1 | // https://www.boost.org/doc/libs/1_67_0/libs/filesystem/example/tut4.cpp 2 | 3 | // filesystem tut4.cpp 4 | // ---------------------------------------------------------------// 5 | 6 | // Copyright Beman Dawes 2009 7 | 8 | // Distributed under the Boost Software License, Version 1.0. 9 | // See http://www.boost.org/LICENSE_1_0.txt 10 | 11 | // Library home page: http://www.boost.org/libs/filesystem 12 | 13 | #include 14 | #include 15 | #include 16 | #include 17 | using std::cout; 18 | using namespace boost::filesystem; 19 | 20 | int main(int argc, char *argv[]) { 21 | if (argc < 2) { 22 | cout << "Usage: tut4 path\n"; 23 | return 1; 24 | } 25 | 26 | path p(argv[1]); 27 | 28 | try { 29 | if (exists(p)) { 30 | if (is_regular_file(p)) 31 | cout << p << " size is " << file_size(p) << '\n'; 32 | 33 | else if (is_directory(p)) { 34 | cout << p << " is a directory containing:\n"; 35 | 36 | std::vector v; 37 | 38 | for (auto &&x : directory_iterator(p)) 39 | v.push_back(x.path()); 40 | 41 | std::sort(v.begin(), v.end()); 42 | 43 | for (auto &&x : v) 44 | cout << " " << x.filename() << '\n'; 45 | } else 46 | cout << p << " exists, but is not a regular file or directory\n"; 47 | } else 48 | cout << p << " does not exist\n"; 49 | } 50 | 51 | catch (const filesystem_error &ex) { 52 | cout << ex.what() << '\n'; 53 | } 54 | 55 | return 0; 56 | } -------------------------------------------------------------------------------- /debian/tests/srcs/test/demo2.cpp: -------------------------------------------------------------------------------- 1 | // boost1.67-1.67.0/libs/test/example/external_main_example_2.cpp 2 | 3 | // (C) Copyright Gennadiy Rozental 2001-2014. 4 | // Distributed under the Boost Software License, Version 1.0. 5 | // (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | 8 | // See http://www.boost.org/libs/test for the library home page. 9 | // 10 | // *************************************************************************** 11 | 12 | #ifndef BOOST_TEST_DYN_LINK 13 | #define BOOST_TEST_DYN_LINK 14 | #endif 15 | #include 16 | using namespace boost::unit_test; 17 | 18 | //____________________________________________________________________________// 19 | 20 | BOOST_AUTO_TEST_SUITE( test_suite_1 ) 21 | 22 | BOOST_AUTO_TEST_CASE( test_case_1 ) 23 | { 24 | BOOST_TEST_MESSAGE( "Testing is in progress" ); 25 | 26 | BOOST_CHECK( true ); 27 | } 28 | 29 | BOOST_AUTO_TEST_SUITE_END() 30 | 31 | //____________________________________________________________________________// 32 | 33 | bool 34 | init_function() 35 | { 36 | // do your own initialization here 37 | // if it successful return true 38 | 39 | // But, you CAN'T use testing tools here 40 | return true; 41 | } 42 | 43 | //____________________________________________________________________________// 44 | 45 | int 46 | main( int argc, char* argv[] ) 47 | { 48 | return ::boost::unit_test::unit_test_main( &init_function, argc, argv ); 49 | } 50 | 51 | //____________________________________________________________________________// 52 | -------------------------------------------------------------------------------- /debian/tests/srcs/program-options/demo1.cpp: -------------------------------------------------------------------------------- 1 | // boost1.67-1.67.0/libs/program-options/example/first.cpp 2 | 3 | // Copyright Vladimir Prus 2002-2004. 4 | // Distributed under the Boost Software License, Version 1.0. 5 | // (See accompanying file LICENSE_1_0.txt 6 | // or copy at http://www.boost.org/LICENSE_1_0.txt) 7 | 8 | /* The simplest usage of the library. 9 | */ 10 | 11 | #include 12 | namespace po = boost::program_options; 13 | 14 | #include 15 | #include 16 | using namespace std; 17 | 18 | int main(int ac, char* av[]) 19 | { 20 | try { 21 | 22 | po::options_description desc("Allowed options"); 23 | desc.add_options() 24 | ("help", "produce help message") 25 | ("compression", po::value(), "set compression level") 26 | ; 27 | 28 | po::variables_map vm; 29 | po::store(po::parse_command_line(ac, av, desc), vm); 30 | po::notify(vm); 31 | 32 | if (vm.count("help")) { 33 | cout << desc << "\n"; 34 | return 0; 35 | } 36 | 37 | if (vm.count("compression")) { 38 | cout << "Compression level was set to " 39 | << vm["compression"].as() << ".\n"; 40 | } else { 41 | cout << "Compression level was not set.\n"; 42 | } 43 | } 44 | catch(exception& e) { 45 | cerr << "error: " << e.what() << "\n"; 46 | return 1; 47 | } 48 | catch(...) { 49 | cerr << "Exception of unknown type!\n"; 50 | } 51 | 52 | return 0; 53 | } 54 | -------------------------------------------------------------------------------- /debian/tests/srcs/locale/demo2.cpp: -------------------------------------------------------------------------------- 1 | // https://www.boost.org/doc/libs/1_67_0/libs/locale/doc/html/hello_8cpp-example.html 2 | 3 | // 4 | // Copyright (c) 2009-2011 Artyom Beilis (Tonkikh) 5 | // 6 | // Distributed under the Boost Software License, Version 1.0. (See 7 | // accompanying file LICENSE_1_0.txt or copy at 8 | // http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | #include 11 | #include 12 | #include 13 | int main() { 14 | using namespace boost::locale; 15 | using namespace std; 16 | generator gen; 17 | locale loc = gen(""); 18 | // Create system default locale 19 | locale::global(loc); 20 | // Make it system global 21 | 22 | cout.imbue(loc); 23 | // Set as default locale for output 24 | 25 | cout << format("Today {1,date} at {1,time} we had run our first localization " 26 | "example") % 27 | time(0) 28 | << endl; 29 | 30 | cout << "This is how we show numbers in this locale " << as::number << 103.34 31 | << endl; 32 | cout << "This is how we show currency in this locale " << as::currency 33 | << 103.34 << endl; 34 | cout << "This is typical date in the locale " << as::date << std::time(0) 35 | << endl; 36 | cout << "This is typical time in the locale " << as::time << std::time(0) 37 | << endl; 38 | cout << "This is upper case " << to_upper("Hello World!") << endl; 39 | cout << "This is lower case " << to_lower("Hello World!") << endl; 40 | cout << "This is title case " << to_title("Hello World!") << endl; 41 | cout << "This is fold case " << fold_case("Hello World!") << endl; 42 | } -------------------------------------------------------------------------------- /debian/tests/srcs/signals/demo2.cpp: -------------------------------------------------------------------------------- 1 | // boost1.67-1.67.0/libs/signals2/example/slot_arguments.cpp 2 | 3 | // Example program for passing arguments from signal invocations to slots. 4 | // 5 | // Copyright Douglas Gregor 2001-2004. 6 | // Copyright Frank Mori Hess 2009. 7 | // 8 | // Use, modification and 9 | // distribution is subject to the Boost Software License, Version 10 | // 1.0. (See accompanying file LICENSE_1_0.txt or copy at 11 | // http://www.boost.org/LICENSE_1_0.txt) 12 | // For more information, see http://www.boost.org 13 | 14 | #include 15 | #include 16 | 17 | //[ slot_arguments_slot_defs_code_snippet 18 | void print_args(float x, float y) 19 | { 20 | std::cout << "The arguments are " << x << " and " << y << std::endl; 21 | } 22 | 23 | void print_sum(float x, float y) 24 | { 25 | std::cout << "The sum is " << x + y << std::endl; 26 | } 27 | 28 | void print_product(float x, float y) 29 | { 30 | std::cout << "The product is " << x * y << std::endl; 31 | } 32 | 33 | void print_difference(float x, float y) 34 | { 35 | std::cout << "The difference is " << x - y << std::endl; 36 | } 37 | 38 | void print_quotient(float x, float y) 39 | { 40 | std::cout << "The quotient is " << x / y << std::endl; 41 | } 42 | //] 43 | 44 | int main() 45 | { 46 | //[ slot_arguments_main_code_snippet 47 | boost::signals2::signal sig; 48 | 49 | sig.connect(&print_args); 50 | sig.connect(&print_sum); 51 | sig.connect(&print_product); 52 | sig.connect(&print_difference); 53 | sig.connect(&print_quotient); 54 | 55 | sig(5., 3.); 56 | //] 57 | return 0; 58 | } 59 | 60 | -------------------------------------------------------------------------------- /debian/tests/srcs/atomic/demo2.cpp: -------------------------------------------------------------------------------- 1 | // https://www.boost.org/doc/libs/1_67_0/doc/html/atomic/usage_examples.html#boost_atomic.usage_examples.example_ringbuffer 2 | 3 | #include 4 | 5 | template 6 | class ringbuffer 7 | { 8 | public: 9 | ringbuffer() : head_(0), tail_(0) {} 10 | 11 | bool push(const T &value) 12 | { 13 | size_t head = head_.load(boost::memory_order_relaxed); 14 | size_t next_head = next(head); 15 | if (next_head == tail_.load(boost::memory_order_acquire)) 16 | return false; 17 | ring_[head] = value; 18 | head_.store(next_head, boost::memory_order_release); 19 | return true; 20 | } 21 | bool pop(T &value) 22 | { 23 | size_t tail = tail_.load(boost::memory_order_relaxed); 24 | if (tail == head_.load(boost::memory_order_acquire)) 25 | return false; 26 | value = ring_[tail]; 27 | tail_.store(next(tail), boost::memory_order_release); 28 | return true; 29 | } 30 | 31 | private: 32 | size_t next(size_t current) 33 | { 34 | return (current + 1) % Size; 35 | } 36 | T ring_[Size]; 37 | boost::atomic head_, tail_; 38 | }; 39 | 40 | int main() 41 | { 42 | ringbuffer r; 43 | 44 | // try to insert an element 45 | if (r.push(42)) 46 | { /* succeeded */ 47 | } 48 | else 49 | { /* buffer full */ 50 | } 51 | 52 | // try to retrieve an element 53 | int value; 54 | if (r.pop(value)) 55 | { /* succeeded */ 56 | } 57 | else 58 | { /* buffer empty */ 59 | } 60 | } -------------------------------------------------------------------------------- /debian/tests/srcs/random/demo1.cpp: -------------------------------------------------------------------------------- 1 | // boost1.67-1.67.0/libs/random/example/password.cpp 2 | 3 | // password.cpp 4 | // 5 | // Copyright (c) 2010 6 | // Steven Watanabe 7 | // 8 | // Distributed under the Boost Software License, Version 1.0. (See 9 | // accompanying file LICENSE_1_0.txt or copy at 10 | // http://www.boost.org/LICENSE_1_0.txt) 11 | 12 | //[password 13 | /*` 14 | For the source of this example see 15 | [@boost://libs/random/example/password.cpp password.cpp]. 16 | 17 | This example demonstrates generating a random 8 character 18 | password. 19 | */ 20 | 21 | 22 | #include 23 | #include 24 | #include 25 | 26 | int main() { 27 | /*<< We first define the characters that we're going 28 | to allow. This is pretty much just the characters 29 | on a standard keyboard. 30 | >>*/ 31 | std::string chars( 32 | "abcdefghijklmnopqrstuvwxyz" 33 | "ABCDEFGHIJKLMNOPQRSTUVWXYZ" 34 | "1234567890" 35 | "!@#$%^&*()" 36 | "`~-_=+[{]}\\|;:'\",<.>/? "); 37 | /*<< We use __random_device as a source of entropy, since we want 38 | passwords that are not predictable. 39 | >>*/ 40 | boost::random::random_device rng; 41 | /*<< Finally we select 8 random characters from the 42 | string and print them to cout. 43 | >>*/ 44 | boost::random::uniform_int_distribution<> index_dist(0, chars.size() - 1); 45 | for(int i = 0; i < 8; ++i) { 46 | std::cout << chars[index_dist(rng)]; 47 | } 48 | std::cout << std::endl; 49 | } 50 | 51 | //] 52 | -------------------------------------------------------------------------------- /debian/tests/srcs/fiber/demo1.cpp: -------------------------------------------------------------------------------- 1 | 2 | // Copyright Oliver Kowalke 2013. 3 | // Distributed under the Boost Software License, Version 1.0. 4 | // (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt) 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | 12 | #include 13 | 14 | int main() { 15 | using channel_t = boost::fibers::buffered_channel< std::string >; 16 | try { 17 | channel_t chan1{ 2 }, chan2{ 2 }; 18 | 19 | boost::fibers::fiber fping([&chan1,&chan2]{ 20 | chan1.push( "ping"); 21 | std::cout << chan2.value_pop() << "\n"; 22 | chan1.push( "ping"); 23 | std::cout << chan2.value_pop() << "\n"; 24 | chan1.push( "ping"); 25 | std::cout << chan2.value_pop() << "\n"; 26 | }); 27 | boost::fibers::fiber fpong([&chan1,&chan2]{ 28 | std::cout << chan1.value_pop() << "\n"; 29 | chan2.push( "pong"); 30 | std::cout << chan1.value_pop() << "\n"; 31 | chan2.push( "pong"); 32 | std::cout << chan1.value_pop() << "\n"; 33 | chan2.push( "pong"); 34 | }); 35 | 36 | fping.join(); 37 | fpong.join(); 38 | 39 | std::cout << "done." << std::endl; 40 | 41 | return EXIT_SUCCESS; 42 | } 43 | catch ( std::exception const& e) 44 | { std::cerr << "exception: " << e.what() << std::endl; } 45 | catch (...) 46 | { std::cerr << "unhandled exception" << std::endl; } 47 | return EXIT_FAILURE; 48 | } 49 | -------------------------------------------------------------------------------- /debian/README.source: -------------------------------------------------------------------------------- 1 | 2 | HOW TO GENERATE THE SOURCE TARBALL 3 | --------------------------------- 4 | 5 | The Debian package for Boost are not built from the tarballs 6 | officially published on the Boost website, but from the 7 | correspondingly named tags in the git project hosted at [1]. 8 | 9 | [1] https://github.com/boostorg/boost/ 10 | 11 | This is because the distributed tarballs are already partially 12 | processed (for example, some documentation is already built and some 13 | files are organized in a different directory structure), while we want 14 | the Debian build process to start from the most unprocessed source 15 | distribution available. 16 | 17 | The git Boost project makes extensive use of git submodules to handle 18 | all its components. The git command itself is not able to dump a 19 | tarball that includes the submodules, but an auxiliary tool like 20 | git-archive-all[2] can be easily do its job. 21 | 22 | [2] https://github.com/Kentzo/git-archive-all 23 | 24 | All in all, in order to create an upstream tarball you have to: 25 | 26 | 1. Clone the git-archive-all repository: 27 | 28 | git clone git@github.com:Kentzo/git-archive-all.git 29 | 30 | 2. Clone the super-project, checkout the desired tag and initialize 31 | all submodules: 32 | 33 | git clone git@github.com:boostorg/boost.git upstream 34 | cd upstream 35 | git checkout boost-1.67.0 36 | git submodule update --init --recursive 37 | 38 | 3. Use git-archive-all to build the tarball: 39 | 40 | ../git-archive-all/git_archive_all.py ../boost.tar.gz 41 | 42 | 4. Filter the tarball content according to debian/copyright: 43 | 44 | cd boost/packaging/directory 45 | mk-origtargz ../where/you/put/boost.tar.gz 46 | 47 | And there it is you tarball ready for building. :-) 48 | -------------------------------------------------------------------------------- /debian/tests/srcs/stacktrace/demo2.cpp: -------------------------------------------------------------------------------- 1 | // boost1.67-1.67.0/libs/stacktrace/example/trace_addresses.cpp 2 | // Copyright Antony Polukhin, 2016-2017. 3 | // 4 | // Distributed under the Boost Software License, Version 1.0. (See 5 | // accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | 8 | #include 9 | 10 | #ifdef BOOST_NO_CXX11_RANGE_BASED_FOR 11 | #include 12 | #include // std::cout 13 | 14 | namespace bs = boost::stacktrace; 15 | void dump_compact(const bs::stacktrace& st) { 16 | for (unsigned i = 0; i < st.size(); ++i) { 17 | bs::frame frame = st[i]; 18 | std::cout << frame.address() << ','; 19 | } 20 | 21 | std::cout << std::endl; 22 | } 23 | #else 24 | //[getting_started_trace_addresses 25 | #include 26 | #include // std::cout 27 | 28 | namespace bs = boost::stacktrace; 29 | void dump_compact(const bs::stacktrace& st) { 30 | for (bs::frame frame: st) { 31 | std::cout << frame.address() << ','; 32 | } 33 | 34 | std::cout << std::endl; 35 | } 36 | //] 37 | #endif 38 | 39 | BOOST_NOINLINE boost::stacktrace::stacktrace rec1(int i); 40 | BOOST_NOINLINE boost::stacktrace::stacktrace rec2(int i); 41 | 42 | BOOST_NOINLINE boost::stacktrace::stacktrace rec1(int i) { 43 | if (i < 5) { 44 | if (!i) return boost::stacktrace::stacktrace(); 45 | return rec2(--i); 46 | } 47 | 48 | return rec2(i - 2); 49 | } 50 | 51 | BOOST_NOINLINE boost::stacktrace::stacktrace rec2(int i) { 52 | if (i < 5) { 53 | if (!i) return boost::stacktrace::stacktrace(); 54 | return rec2(--i); 55 | } 56 | 57 | return rec2(i - 2); 58 | } 59 | 60 | int main() { 61 | dump_compact(rec1(8)); 62 | } 63 | 64 | 65 | -------------------------------------------------------------------------------- /debian/quickbook.1: -------------------------------------------------------------------------------- 1 | .TH QUICKBOOK "1" "July 2009" "Quickbook Version 1.4" "User Commands" 2 | .SH NAME 3 | Quickbook \- WikiWiki style documentation tool geared towards C++ documentation 4 | .SH DESCRIPTION 5 | .B QuickBook 6 | is a WikiWiki style documentation tool geared towards C++ 7 | documentation using simple rules and markup for simple formatting 8 | tasks. 9 | .B QuickBook 10 | extends the WikiWiki concept. Like the WikiWiki, 11 | QuickBook documents are simple text files. A single QuickBook document 12 | can generate a fully linked set of nice HTML and PostScript/PDF 13 | documents complete with images and syntax- colorized source code. 14 | .PP 15 | Features include: 16 | .PP 17 | * generate BoostBook xml, to generate HTML, PostScript and PDF 18 | * simple markup to link to Doxygen-generated entities 19 | * macro system for simple text substitution 20 | * simple markup for italics, bold, preformatted, blurbs, code samples, tables, URLs, anchors, images, etc. 21 | * automatic syntax coloring of code samples 22 | * CSS support 23 | 24 | .SS "Allowed options:" 25 | .TP 26 | \fB\-\-help\fR 27 | produce help message 28 | .TP 29 | \fB\-\-version\fR 30 | print version string 31 | .TP 32 | \fB\-\-no\-pretty\-print\fR 33 | disable XML pretty printing 34 | .TP 35 | \fB\-\-indent\fR arg 36 | indent spaces 37 | .TP 38 | \fB\-\-linewidth\fR arg 39 | line width 40 | .TP 41 | \fB\-\-input\-file\fR arg 42 | input file 43 | .TP 44 | \fB\-\-output\-file\fR arg 45 | output file 46 | .TP 47 | \fB\-\-debug\fR 48 | debug mode (for developers) 49 | .TP 50 | \fB\-\-ms\-errors\fR 51 | use Microsoft Visual Studio style error & warn 52 | message format 53 | .HP 54 | \fB\-I\fR [ \fB\-\-include\-path\fR ] arg include path 55 | .SH "SEE ALSO" 56 | The full documentation for 57 | .B Quickbook 58 | is maintained in HTML; see 59 | /usr/share/doc/libboostX.Y-doc/HTML/doc/html/quickbook.html 60 | -------------------------------------------------------------------------------- /debian/patches/fix_extension.patch: -------------------------------------------------------------------------------- 1 | Description: fix python extensions 2 | Author: Anton Gladky 3 | Last-Update: 2023-01-14 4 | 5 | --- boost1.81-1.81.0.orig/tools/build/src/tools/python.jam 6 | +++ boost1.81-1.81.0/tools/build/src/tools/python.jam 7 | @@ -954,8 +954,32 @@ local rule configure ( version ? : cmd-o 8 | toolset.add-requirements 9 | "$(target-requirements:J=,):$(interpreter-cmd)" ; 10 | 11 | - # Register the right suffix for extensions. 12 | - register-extension-suffix $(extension-suffix) : $(target-requirements) ; 13 | + # 14 | + # Discover and set extension suffix 15 | + # 16 | + debug-message "Checking for extension suffix..." ; 17 | + local full-cmd = "from __future__ import print_function; import sysconfig; print(sysconfig.get_config_var('EXT_SUFFIX'))" ; 18 | + local full-cmd = $(interpreter-cmd)" -c \"$(full-cmd)\"" ; 19 | + debug-message "running command '$(full-cmd)'" ; 20 | + local result = [ SHELL $(full-cmd) : strip-eol : exit-status ] ; 21 | + if $(result[2]) = 0 22 | + { 23 | + debug-message "Python extenssion suffix is $(result[1])" ; 24 | + type.set-generated-target-suffix PYTHON_EXTENSION : $(target-requirements) : <$(result[1])> ; 25 | + } 26 | + else 27 | + { 28 | + debug-message "Failed to determine python extension suffix" ; 29 | + debug-message "Falling back to old behaviour" ; 30 | + if $(target-os) = windows && on in $(condition) 31 | + { 32 | + extension-suffix ?= _d ; 33 | + } 34 | + extension-suffix ?= "" ; 35 | + 36 | + # Register the right suffix for extensions. 37 | + register-extension-suffix $(extension-suffix) : $(target-requirements) ; 38 | + } 39 | 40 | # Make sure that the python feature is always considered 41 | # relevant for any targets that depend on python. Without 42 | -------------------------------------------------------------------------------- /debian/tests/srcs/graph/demo1.cpp: -------------------------------------------------------------------------------- 1 | // https://www.boost.org/doc/libs/1_67_0/libs/graph/example/family-tree-eg.cpp 2 | 3 | //======================================================================= 4 | // Copyright 2001 Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee, 5 | // 6 | // Distributed under the Boost Software License, Version 1.0. (See 7 | // accompanying file LICENSE_1_0.txt or copy at 8 | // http://www.boost.org/LICENSE_1_0.txt) 9 | //======================================================================= 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | enum family { Jeanie, Debbie, Rick, John, Amanda, Margaret, Benjamin, N }; 17 | int main() { 18 | using namespace boost; 19 | const char *name[] = {"Jeanie", "Debbie", "Rick", "John", 20 | "Amanda", "Margaret", "Benjamin"}; 21 | 22 | adjacency_list<> g(N); 23 | add_edge(Jeanie, Debbie, g); 24 | add_edge(Jeanie, Rick, g); 25 | add_edge(Jeanie, John, g); 26 | add_edge(Debbie, Amanda, g); 27 | add_edge(Rick, Margaret, g); 28 | add_edge(John, Benjamin, g); 29 | 30 | graph_traits>::vertex_iterator i, end; 31 | graph_traits>::adjacency_iterator ai, a_end; 32 | property_map, vertex_index_t>::type index_map = 33 | get(vertex_index, g); 34 | 35 | for (boost::tie(i, end) = vertices(g); i != end; ++i) { 36 | std::cout << name[get(index_map, *i)]; 37 | boost::tie(ai, a_end) = adjacent_vertices(*i, g); 38 | if (ai == a_end) 39 | std::cout << " has no children"; 40 | else 41 | std::cout << " is the parent of "; 42 | for (; ai != a_end; ++ai) { 43 | std::cout << name[get(index_map, *ai)]; 44 | if (boost::next(ai) != a_end) 45 | std::cout << ", "; 46 | } 47 | std::cout << std::endl; 48 | } 49 | return EXIT_SUCCESS; 50 | } -------------------------------------------------------------------------------- /debian/tests/srcs/locale/demo1.cpp: -------------------------------------------------------------------------------- 1 | // https://www.boost.org/doc/libs/1_67_0/libs/locale/doc/html/boundary_8cpp-example.html 2 | 3 | // 4 | // Copyright (c) 2009-2011 Artyom Beilis (Tonkikh) 5 | // 6 | // Distributed under the Boost Software License, Version 1.0. (See 7 | // accompanying file LICENSE_1_0.txt or copy at 8 | // http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | #include 11 | #include 12 | #include 13 | #include 14 | int main() { 15 | using namespace boost::locale; 16 | using namespace std; 17 | generator gen; 18 | // Make system default locale global 19 | std::locale loc = gen(""); 20 | locale::global(loc); 21 | cout.imbue(loc); 22 | 23 | string text = "Hello World! あにま! Linux2.6 and Windows7 is word and " 24 | "number. שָלוֹם עוֹלָם!"; 25 | cout << text << endl; 26 | boundary::ssegment_index index(boundary::word, text.begin(), text.end()); 27 | boundary::ssegment_index::iterator p, e; 28 | for (p = index.begin(), e = index.end(); p != e; ++p) { 29 | cout << "Part [" << *p << "] has "; 30 | if (p->rule() & boundary::word_number) 31 | cout << "number(s) "; 32 | if (p->rule() & boundary::word_letter) 33 | cout << "letter(s) "; 34 | if (p->rule() & boundary::word_kana) 35 | cout << "kana character(s) "; 36 | if (p->rule() & boundary::word_ideo) 37 | cout << "ideographic character(s) "; 38 | if (p->rule() & boundary::word_none) 39 | cout << "no word characters"; 40 | cout << endl; 41 | } 42 | index.map(boundary::character, text.begin(), text.end()); 43 | for (p = index.begin(), e = index.end(); p != e; ++p) { 44 | cout << "|" << *p; 45 | } 46 | cout << "|\n\n"; 47 | index.map(boundary::line, text.begin(), text.end()); 48 | for (p = index.begin(), e = index.end(); p != e; ++p) { 49 | cout << "|" << *p; 50 | } 51 | cout << "|\n\n"; 52 | index.map(boundary::sentence, text.begin(), text.end()); 53 | for (p = index.begin(), e = index.end(); p != e; ++p) { 54 | cout << "|" << *p; 55 | } 56 | cout << "|\n\n"; 57 | } -------------------------------------------------------------------------------- /debian/tests/srcs/chrono/demo2.cpp: -------------------------------------------------------------------------------- 1 | // https://www.boost.org/doc/libs/1_67_0/doc/html/atomic/usage_examples.html#boost_atomic.usage_examples.example_ringbuffer 2 | 3 | #include 4 | #include 5 | 6 | #include 7 | 8 | using namespace boost::chrono; 9 | 10 | template 11 | To round_up(boost::chrono::duration d) 12 | { 13 | To result = boost::chrono::duration_cast(d); 14 | if (result < d) 15 | ++result; 16 | return result; 17 | } 18 | 19 | struct xtime 20 | { 21 | long sec; 22 | unsigned long usec; 23 | }; 24 | 25 | template 26 | xtime to_xtime_truncate(boost::chrono::duration d) 27 | { 28 | xtime xt; 29 | xt.sec = static_cast(boost::chrono::duration_cast(d).count()); 30 | xt.usec = static_cast(boost::chrono::duration_cast(d - seconds(xt.sec)).count()); 31 | return xt; 32 | } 33 | 34 | template 35 | xtime to_xtime_round_up(boost::chrono::duration d) 36 | { 37 | xtime xt; 38 | xt.sec = static_cast(boost::chrono::duration_cast(d).count()); 39 | xt.usec = static_cast(round_up(d - boost::chrono::seconds(xt.sec)).count()); 40 | return xt; 41 | } 42 | 43 | microseconds 44 | from_xtime(xtime xt) 45 | { 46 | return boost::chrono::seconds(xt.sec) + boost::chrono::microseconds(xt.usec); 47 | } 48 | 49 | void print(xtime xt) 50 | { 51 | std::cout << '{' << xt.sec << ',' << xt.usec << "}\n"; 52 | } 53 | 54 | int main() 55 | { 56 | xtime xt = to_xtime_truncate(seconds(3) + boost::chrono::milliseconds(251)); 57 | print(xt); 58 | boost::chrono::milliseconds ms = boost::chrono::duration_cast(from_xtime(xt)); 59 | std::cout << ms.count() << " milliseconds\n"; 60 | xt = to_xtime_round_up(ms); 61 | print(xt); 62 | xt = to_xtime_truncate(boost::chrono::seconds(3) + nanoseconds(999)); 63 | print(xt); 64 | xt = to_xtime_round_up(boost::chrono::seconds(3) + nanoseconds(999)); 65 | print(xt); 66 | } -------------------------------------------------------------------------------- /debian/tests/gio/test_any.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | 5 | #include 6 | 7 | using boost::any_cast; 8 | typedef std::list many; 9 | 10 | void append_int(many & values, int value) 11 | { 12 | boost::any to_append = value; 13 | values.push_back(to_append); 14 | } 15 | 16 | void append_string(many & values, const std::string & value) 17 | { 18 | values.push_back(value); 19 | } 20 | 21 | void append_char_ptr(many & values, const char * value) 22 | { 23 | values.push_back(value); 24 | } 25 | 26 | void append_any(many & values, const boost::any & value) 27 | { 28 | values.push_back(value); 29 | } 30 | 31 | void append_nothing(many & values) 32 | { 33 | values.push_back(boost::any()); 34 | } 35 | 36 | bool is_empty(const boost::any & operand) 37 | { 38 | return operand.empty(); 39 | } 40 | 41 | bool is_int(const boost::any & operand) 42 | { 43 | return operand.type() == typeid(int); 44 | } 45 | 46 | bool is_char_ptr(const boost::any & operand) 47 | { 48 | try 49 | { 50 | any_cast(operand); 51 | return true; 52 | } 53 | catch(const boost::bad_any_cast &) 54 | { 55 | return false; 56 | } 57 | } 58 | 59 | bool is_string(const boost::any & operand) 60 | { 61 | return any_cast(&operand); 62 | } 63 | 64 | void count_all(many & values, std::ostream & out) 65 | { 66 | out << "#empty == " 67 | << std::count_if(values.begin(), values.end(), is_empty) << std::endl; 68 | out << "#int == " 69 | << std::count_if(values.begin(), values.end(), is_int) << std::endl; 70 | out << "#const char * == " 71 | << std::count_if(values.begin(), values.end(), is_char_ptr) << std::endl; 72 | out << "#string == " 73 | << std::count_if(values.begin(), values.end(), is_string) << std::endl; 74 | } 75 | 76 | int main(int, char*[]) { 77 | many values; 78 | append_int(values, 10); 79 | append_int(values, 100); 80 | append_string(values, "Hello!"); 81 | append_char_ptr(values, "World!"); 82 | append_nothing(values); 83 | append_nothing(values); 84 | count_all(values, std::cout); 85 | return 0; 86 | } 87 | 88 | -------------------------------------------------------------------------------- /debian/tests/srcs/container/demo3.cpp: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // (C) Copyright Ion Gaztanaga 2009-2013. Distributed under the Boost 4 | // Software License, Version 1.0. (See accompanying file 5 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | // See http://www.boost.org/libs/container for documentation. 8 | // 9 | ////////////////////////////////////////////////////////////////////////////// 10 | 11 | //[doc_recursive_containers 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | 19 | using namespace boost::container; 20 | 21 | struct data 22 | { 23 | int i_; 24 | //A vector holding still undefined class 'data' 25 | vector v_; 26 | vector::iterator vi_; 27 | //A stable_vector holding still undefined class 'data' 28 | stable_vector sv_; 29 | stable_vector::iterator svi_; 30 | //A stable_vector holding still undefined class 'data' 31 | deque d_; 32 | deque::iterator di_; 33 | //A list holding still undefined 'data' 34 | list l_; 35 | list::iterator li_; 36 | //A map holding still undefined 'data' 37 | map m_; 38 | map::iterator mi_; 39 | 40 | friend bool operator <(const data &l, const data &r) 41 | { return l.i_ < r.i_; } 42 | }; 43 | 44 | struct tree_node 45 | { 46 | string name; 47 | string value; 48 | 49 | //children nodes of this node 50 | list children_; 51 | list::iterator selected_child_; 52 | }; 53 | 54 | 55 | 56 | int main() 57 | { 58 | //a container holding a recursive data type 59 | stable_vector sv; 60 | sv.resize(100); 61 | 62 | //Let's build a tree based in 63 | //a recursive data type 64 | tree_node root; 65 | root.name = "root"; 66 | root.value = "root_value"; 67 | root.children_.resize(7); 68 | root.selected_child_ = root.children_.begin(); 69 | return 0; 70 | } 71 | //] 72 | -------------------------------------------------------------------------------- /debian/tests/srcs/datetime/demo1.cpp: -------------------------------------------------------------------------------- 1 | /* The following is a simple example that shows conversion of dates 2 | * to and from a std::string. 3 | * 4 | * Expected output: 5 | * 2001-Oct-09 6 | * 2001-10-09 7 | * Tuesday October 9, 2001 8 | * An expected exception is next: 9 | * Exception: Month number is out of range 1..12 10 | */ 11 | 12 | #include "boost/date_time/gregorian/gregorian.hpp" 13 | #include 14 | #include 15 | 16 | int 17 | main() 18 | { 19 | 20 | using namespace boost::gregorian; 21 | 22 | try { 23 | // The following date is in ISO 8601 extended format (CCYY-MM-DD) 24 | std::string s("2001-10-9"); //2001-October-09 25 | date d(from_simple_string(s)); 26 | std::cout << to_simple_string(d) << std::endl; 27 | 28 | //Read ISO 8601 Standard(CCYYMMDD) and output ISO 8601 Extended 29 | std::string ud("20011009"); //2001-Oct-09 30 | date d1(from_undelimited_string(ud)); 31 | std::cout << to_iso_extended_string(d1) << std::endl; 32 | 33 | //Output the parts of the date - Tuesday October 9, 2001 34 | date::ymd_type ymd = d1.year_month_day(); 35 | greg_weekday wd = d1.day_of_week(); 36 | std::cout << wd.as_long_string() << " " 37 | << ymd.month.as_long_string() << " " 38 | << ymd.day << ", " << ymd.year 39 | << std::endl; 40 | 41 | //Let's send in month 25 by accident and create an exception 42 | std::string bad_date("20012509"); //2001-??-09 43 | std::cout << "An expected exception is next: " << std::endl; 44 | date wont_construct(from_undelimited_string(bad_date)); 45 | //use wont_construct so compiler doesn't complain, but you wont get here! 46 | std::cout << "oh oh, you shouldn't reach this line: " 47 | << to_iso_string(wont_construct) << std::endl; 48 | } 49 | catch(std::exception& e) { 50 | std::cout << " Exception: " << e.what() << std::endl; 51 | } 52 | 53 | 54 | return 0; 55 | } 56 | 57 | /* Copyright 2001-2004: CrystalClear Software, Inc 58 | * http://www.crystalclearsoftware.com 59 | * 60 | * Subject to the Boost Software License, Version 1.0. 61 | * (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) 62 | */ 63 | 64 | -------------------------------------------------------------------------------- /debian/README.copyright: -------------------------------------------------------------------------------- 1 | 2 | HOW TO GENERATE THE COPYRIGHT FILE 3 | ---------------------------------- 4 | 5 | The debian/copyright file for Boost is very complicated, because the 6 | library has accumulated a huge number of files and contributors over 7 | the years. It would be intractable to fill it by hand, and FTP masters 8 | do not like the previous choice to just generically indicate the Boost 9 | Software License and see each individual file for the differences. 10 | 11 | Fortunately Boost itself already contains a small program, called bcp, 12 | that searches for common regular expressions in each file to find the 13 | file's license and copyright holders. The program has some 14 | deficiencies, but is overall a good foundation to automatically 15 | generate a debian/copyright file. 16 | 17 | A patched fork of the bcp program is maintained by Giovanni Mascellani 18 | in the repository [1]. 19 | 20 | [1] https://salsa.debian.org/gio/boost-copyright 21 | 22 | It can be compiled with qmake and make. Then you change dir to where 23 | you have unpacked the Boost tarball and run something like: 24 | 25 | find -type f | grep -v ^./debian/ | grep -v ^./.pc/ | bcp --report-debian --read-from-stdin debian/copyright 26 | 27 | This will erase and regenerate the debian/copyright file. The 28 | boost-copyright repository already contains a skeleton of the 29 | copyright file (called manual_copyright), which is automatically 30 | included at the beginning of the generated file. 31 | 32 | Since bcp cannot identify the copyright status for each single file, 33 | because some of them do not actually contain such information, the 34 | manual_copyright file contains some blanket stanzas for the main Boost 35 | directories, so that the copyright for each not better identified file 36 | is (reasonably) assigned to the people responsible for that 37 | subdirectory. The subdirectories loosely correspond to the individual 38 | Boost libraries. Also, a public domain dedication is presumed for the 39 | few and very simple files that are neither recognized by the program, 40 | neither contained in one of the well-known subdirectories. 41 | 42 | The script generator.py, in the boost-copyright repository, can be 43 | used to manually regenerate most of manual_copyright based on the 44 | meta/repositories.json files available in the Boost 45 | distribution. However it is recommended to carefully check its output, 46 | because there will be some inaccuracies. 47 | -------------------------------------------------------------------------------- /debian/example-files: -------------------------------------------------------------------------------- 1 | libs/accumulators/example 2 | libs/algorithm/example 3 | libs/algorithm/minmax/example 4 | libs/algorithm/string/example 5 | libs/asio/example 6 | libs/beast/example 7 | libs/beast/test/example 8 | libs/bimap/example 9 | libs/callable_traits/example 10 | libs/chrono/example 11 | libs/circular_buffer/example 12 | libs/compute/example 13 | libs/container/example 14 | libs/container_hash/examples 15 | libs/context/example 16 | libs/contract/example 17 | libs/convert/example 18 | libs/coroutine2/example 19 | libs/coroutine/example 20 | libs/date_time/example 21 | libs/dll/example 22 | libs/dynamic_bitset/example 23 | libs/endian/example 24 | libs/exception/example 25 | libs/fiber/examples 26 | libs/filesystem/example 27 | libs/flyweight/example 28 | libs/format/example 29 | libs/function/example 30 | libs/function_types/example 31 | libs/fusion/example 32 | libs/geometry/example 33 | libs/geometry/index/example 34 | libs/gil/example 35 | libs/graph/example 36 | libs/graph_parallel/example 37 | libs/hana/example 38 | libs/heap/examples 39 | libs/histogram/examples 40 | libs/hof/example 41 | libs/icl/example 42 | libs/interprocess/example 43 | libs/intrusive/example 44 | libs/iostreams/example 45 | libs/iterator/example 46 | libs/lexical_cast/example 47 | libs/locale/examples 48 | libs/local_function/example 49 | libs/lockfree/examples 50 | libs/log/example 51 | libs/math/example 52 | libs/metaparse/example 53 | libs/move/example 54 | libs/mpi/example 55 | libs/mpl/example 56 | libs/msm/example 57 | libs/multi_array/example 58 | libs/multi_index/example 59 | libs/multiprecision/example 60 | libs/numeric/interval/examples 61 | libs/numeric/odeint/examples 62 | libs/numeric/ublas/examples 63 | libs/numeric/ublas/IDEs/qtcreator/examples 64 | libs/phoenix/example 65 | libs/poly_collection/example 66 | libs/polygon/example 67 | libs/pool/example 68 | libs/process/example 69 | libs/program_options/example 70 | libs/property_map/example 71 | libs/property_tree/examples 72 | libs/proto/example 73 | libs/python/example 74 | libs/random/example 75 | libs/ratio/example 76 | libs/regex/example 77 | libs/safe_numerics/example 78 | libs/scope_exit/example 79 | libs/serialization/example 80 | libs/signals2/example 81 | libs/smart_ptr/example 82 | libs/sort/example 83 | libs/spirit/classic/example 84 | libs/spirit/classic/phoenix/example 85 | libs/spirit/example 86 | libs/spirit/repository/example 87 | libs/stacktrace/example 88 | libs/statechart/example 89 | libs/static_assert/example 90 | libs/test/example 91 | libs/thread/example 92 | libs/timer/example 93 | libs/tokenizer/example 94 | libs/type_erasure/example 95 | libs/type_index/examples 96 | libs/type_traits/examples 97 | libs/units/example 98 | libs/unordered/examples 99 | libs/xpressive/example 100 | libs/yap/example 101 | tools/boostdep/examples 102 | tools/build/example 103 | tools/quickbook/examples 104 | -------------------------------------------------------------------------------- /debian/tests/srcs/chrono/demo1.cpp: -------------------------------------------------------------------------------- 1 | // https://www.boost.org/doc/libs/1_67_0/doc/html/chrono/users_guide.html#chrono.users_guide.examples 2 | 3 | #include 4 | #include 5 | 6 | namespace I_dont_like_the_default_duration_behavior 7 | { 8 | 9 | template 10 | class zero_default 11 | { 12 | public: 13 | typedef R rep; 14 | 15 | private: 16 | rep rep_; 17 | 18 | public: 19 | zero_default(rep i = 0) : rep_(i) {} 20 | operator rep() const { return rep_; } 21 | 22 | zero_default &operator+=(zero_default x) 23 | { 24 | rep_ += x.rep_; 25 | return *this; 26 | } 27 | zero_default &operator-=(zero_default x) 28 | { 29 | rep_ -= x.rep_; 30 | return *this; 31 | } 32 | zero_default &operator*=(zero_default x) 33 | { 34 | rep_ *= x.rep_; 35 | return *this; 36 | } 37 | zero_default &operator/=(zero_default x) 38 | { 39 | rep_ /= x.rep_; 40 | return *this; 41 | } 42 | 43 | zero_default operator+() const { return *this; } 44 | zero_default operator-() const { return zero_default(-rep_); } 45 | zero_default &operator++() 46 | { 47 | ++rep_; 48 | return *this; 49 | } 50 | zero_default operator++(int) { return zero_default(rep_++); } 51 | zero_default &operator--() 52 | { 53 | --rep_; 54 | return *this; 55 | } 56 | zero_default operator--(int) { return zero_default(rep_--); } 57 | 58 | friend zero_default operator+(zero_default x, zero_default y) { return x += y; } 59 | friend zero_default operator-(zero_default x, zero_default y) { return x -= y; } 60 | friend zero_default operator*(zero_default x, zero_default y) { return x *= y; } 61 | friend zero_default operator/(zero_default x, zero_default y) { return x /= y; } 62 | 63 | friend bool operator==(zero_default x, zero_default y) { return x.rep_ == y.rep_; } 64 | friend bool operator!=(zero_default x, zero_default y) { return !(x == y); } 65 | friend bool operator<(zero_default x, zero_default y) { return x.rep_ < y.rep_; } 66 | friend bool operator<=(zero_default x, zero_default y) { return !(y < x); } 67 | friend bool operator>(zero_default x, zero_default y) { return y < x; } 68 | friend bool operator>=(zero_default x, zero_default y) { return !(x < y); } 69 | }; 70 | 71 | typedef boost::chrono::duration, boost::nano> nanoseconds; 72 | typedef boost::chrono::duration, boost::micro> microseconds; 73 | typedef boost::chrono::duration, boost::milli> milliseconds; 74 | typedef boost::chrono::duration> seconds; 75 | typedef boost::chrono::duration, boost::ratio<60>> minutes; 76 | typedef boost::chrono::duration, boost::ratio<3600>> hours; 77 | } // namespace I_dont_like_the_default_duration_behavior 78 | 79 | int main() 80 | { 81 | using namespace I_dont_like_the_default_duration_behavior; 82 | 83 | milliseconds ms; 84 | std::cout << ms.count() << '\n'; 85 | } -------------------------------------------------------------------------------- /debian/tests/srcs/coroutine/demo2.cpp: -------------------------------------------------------------------------------- 1 | // boost1.67-1.67.0/libs/coroutine2/example/parser.cpp 2 | 3 | // Copyright Oliver Kowalke 2014. 4 | // Distributed under the Boost Software License, Version 1.0. 5 | // (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #include 16 | 17 | class parser_error : public std::runtime_error { 18 | public: 19 | parser_error() : 20 | std::runtime_error("parsing failed") { 21 | } 22 | }; 23 | 24 | /* 25 | * grammar: 26 | * P ---> E '\0' 27 | * E ---> T {('+'|'-') T} 28 | * T ---> S {('*'|'/') S} 29 | * S ---> digit | '(' E ')' 30 | */ 31 | class Parser{ 32 | char next; 33 | std::istream& is; 34 | std::function cb; 35 | 36 | char pull(){ 37 | return std::char_traits::to_char_type(is.get()); 38 | } 39 | 40 | void scan(){ 41 | do{ 42 | next=pull(); 43 | } 44 | while(isspace(next)); 45 | } 46 | 47 | public: 48 | Parser(std::istream& is_,std::function cb_) : 49 | next(), is(is_), cb(cb_) 50 | {} 51 | 52 | void run() { 53 | scan(); 54 | E(); 55 | } 56 | 57 | private: 58 | void E(){ 59 | T(); 60 | while (next=='+'||next=='-'){ 61 | cb(next); 62 | scan(); 63 | T(); 64 | } 65 | } 66 | 67 | void T(){ 68 | S(); 69 | while (next=='*'||next=='/'){ 70 | cb(next); 71 | scan(); 72 | S(); 73 | } 74 | } 75 | 76 | void S(){ 77 | if (std::isdigit(next)){ 78 | cb(next); 79 | scan(); 80 | } 81 | else if(next=='('){ 82 | cb(next); 83 | scan(); 84 | E(); 85 | if (next==')'){ 86 | cb(next); 87 | scan(); 88 | }else{ 89 | throw parser_error(); 90 | } 91 | } 92 | else{ 93 | throw parser_error(); 94 | } 95 | } 96 | }; 97 | 98 | typedef boost::coroutines2::coroutine< char > coro_t; 99 | 100 | int main() { 101 | try { 102 | std::istringstream is("1+1"); 103 | // invert control flow 104 | coro_t::pull_type seq( 105 | [&is]( coro_t::push_type & yield) { 106 | Parser p( is, 107 | [&yield](char ch){ 108 | yield(ch); 109 | }); 110 | p.run(); 111 | }); 112 | // user-code pulls parsed data from parser 113 | for(char c:seq){ 114 | printf("Parsed: %c\n",c); 115 | } 116 | std::cout << "\nDone" << std::endl; 117 | return EXIT_SUCCESS; 118 | } catch ( std::exception const& ex) { 119 | std::cerr << "exception: " << ex.what() << std::endl; 120 | } 121 | return EXIT_FAILURE; 122 | } 123 | 124 | -------------------------------------------------------------------------------- /debian/tests/srcs/graph-parallel/demo2.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2004-2006 The Trustees of Indiana University. 2 | 3 | // Use, modification and distribution is subject to the Boost Software 4 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt) 6 | 7 | // Authors: Douglas Gregor 8 | // Andrew Lumsdaine 9 | 10 | // Example usage of dijkstra_shortest_paths algorithm 11 | 12 | // Enable PBGL interfaces to BGL algorithms 13 | #include 14 | 15 | // Communication via MPI 16 | #include 17 | 18 | // Dijkstra's single-source shortest paths algorithm 19 | #include 20 | 21 | // Distributed adjacency list 22 | #include 23 | 24 | // METIS Input 25 | #include 26 | 27 | // Graphviz Output 28 | #include 29 | 30 | // Standard Library includes 31 | #include 32 | #include 33 | 34 | #ifdef BOOST_NO_EXCEPTIONS 35 | void 36 | boost::throw_exception(std::exception const& ex) 37 | { 38 | std::cout << ex.what() << std::endl; 39 | abort(); 40 | } 41 | #endif 42 | 43 | using namespace boost; 44 | using boost::graph::distributed::mpi_process_group; 45 | 46 | /* An undirected, weighted graph with distance values stored on the 47 | vertices. */ 48 | typedef adjacency_list, undirectedS, 49 | /*Vertex properties=*/property, 50 | /*Edge properties=*/property > 51 | Graph; 52 | 53 | int main(int argc, char* argv[]) 54 | { 55 | boost::mpi::environment env(argc,argv); 56 | 57 | // Parse command-line options 58 | const char* filename = "weighted_graph.gr"; 59 | if (argc > 1) filename = argv[1]; 60 | 61 | // Open the METIS input file 62 | std::ifstream in(filename); 63 | graph::metis_reader reader(in); 64 | 65 | // Load the graph using the default distribution 66 | Graph g(reader.begin(), reader.end(), reader.weight_begin(), 67 | reader.num_vertices()); 68 | 69 | // Get vertex 0 in the graph 70 | graph_traits::vertex_descriptor start = vertex(0, g); 71 | 72 | // Compute shortest paths from vertex 0 73 | dijkstra_shortest_paths(g, start, 74 | distance_map(get(vertex_distance, g))); 75 | 76 | // Output a Graphviz DOT file 77 | std::string outfile = filename; 78 | if (argc > 2) 79 | outfile = argv[2]; 80 | else { 81 | size_t i = outfile.rfind('.'); 82 | if (i != std::string::npos) 83 | outfile.erase(outfile.begin() + i, outfile.end()); 84 | outfile += "-dijkstra.dot"; 85 | } 86 | 87 | if (process_id(process_group(g)) == 0) { 88 | std::cout << "Writing GraphViz output to " << outfile << "... "; 89 | std::cout.flush(); 90 | } 91 | write_graphviz(outfile, g, 92 | make_label_writer(get(vertex_distance, g)), 93 | make_label_writer(get(edge_weight, g))); 94 | if (process_id(process_group(g)) == 0) 95 | std::cout << "Done." << std::endl; 96 | 97 | return 0; 98 | } 99 | -------------------------------------------------------------------------------- /debian/tests/control: -------------------------------------------------------------------------------- 1 | Tests: atomic 2 | Depends: ceph-libboost-atomic1.82-dev, build-essential, cmake 3 | 4 | Tests: chrono 5 | Depends: ceph-libboost-chrono1.82-dev, ceph-libboost-system1.82-dev, build-essential, cmake 6 | 7 | Tests: context 8 | Depends: ceph-libboost-context1.82-dev, build-essential, cmake 9 | 10 | Tests: container 11 | Depends: ceph-libboost-container1.82-dev, ceph-libboost-system1.82-dev, build-essential, cmake 12 | 13 | Tests: coroutine 14 | Depends: ceph-libboost-coroutine1.82-dev, ceph-libboost-system1.82-dev, build-essential, cmake 15 | 16 | Tests: datetime 17 | Depends: ceph-libboost-date-time1.82-dev, build-essential, cmake 18 | 19 | Tests: exception 20 | Depends: ceph-libboost-exception1.82-dev, build-essential, cmake 21 | Restrictions: allow-stderr 22 | 23 | Tests: fiber 24 | Depends: ceph-libboost-fiber1.82-dev, build-essential, cmake 25 | 26 | Tests: filesystem 27 | Depends: ceph-libboost-filesystem1.82-dev, build-essential, cmake 28 | 29 | Tests: graph 30 | Depends: ceph-libboost-graph1.82-dev, build-essential, cmake 31 | Restrictions: allow-stderr 32 | 33 | Tests: graph-parallel 34 | Depends: ceph-libboost-graph-parallel1.82-dev, ceph-libboost-mpi1.82-dev, ceph-libboost-system1.82-dev, mpi-default-dev, build-essential, libgraph-easy-perl, cmake 35 | Restrictions: allow-stderr 36 | 37 | Tests: iostreams 38 | Depends: ceph-libboost-iostreams1.82-dev, build-essential, cmake 39 | 40 | Tests: locale 41 | Depends: ceph-libboost-locale1.82-dev, build-essential, cmake 42 | 43 | Tests: log 44 | Depends: ceph-libboost-log1.82-dev, build-essential, cmake 45 | Restrictions: allow-stderr 46 | 47 | Tests: math 48 | Depends: ceph-libboost-math1.82-dev, build-essential, cmake 49 | 50 | Tests: mpi 51 | Depends: ceph-libboost-mpi1.82-dev, mpi-default-dev, build-essential, cmake 52 | Restrictions: allow-stderr 53 | 54 | Tests: mpi-python 55 | Depends: ceph-libboost-mpi-python1.82-dev, mpi-default-dev, python3-minimal 56 | Restrictions: allow-stderr 57 | 58 | Tests: program-options 59 | Depends: ceph-libboost-program-options1.82-dev, build-essential, cmake 60 | 61 | Tests: python 62 | Depends: ceph-libboost-python1.82-dev, python3-minimal, cmake, build-essential, clang 63 | Restrictions: allow-stderr 64 | 65 | Tests: random 66 | Depends: ceph-libboost-random1.82-dev, build-essential, cmake 67 | 68 | Tests: regex 69 | Depends: ceph-libboost-regex1.82-dev, build-essential, cmake, html2text 70 | 71 | Tests: serialization 72 | Depends: ceph-libboost-serialization1.82-dev, ceph-libboost-random1.82-dev, build-essential, cmake 73 | 74 | Tests: stacktrace 75 | Depends: ceph-libboost-stacktrace1.82-dev, ceph-libboost-system1.82-dev, build-essential, cmake 76 | 77 | Tests: system 78 | Depends: ceph-libboost-system1.82-dev, build-essential, cmake 79 | Restrictions: allow-stderr 80 | 81 | Tests: test 82 | Depends: ceph-libboost-test1.82-dev, build-essential, cmake 83 | Restrictions: allow-stderr 84 | 85 | Tests: thread 86 | Depends: ceph-libboost-thread1.82-dev, build-essential, cmake 87 | Restrictions: allow-stderr 88 | 89 | Tests: timer 90 | Depends: ceph-libboost-timer1.82-dev, build-essential, cmake 91 | 92 | Tests: type-erasure 93 | Depends: ceph-libboost-type-erasure1.82-dev, build-essential, cmake 94 | 95 | Tests: wave 96 | Depends: ceph-libboost-wave1.82-dev, ceph-libboost-thread1.82-dev, build-essential, cmake 97 | -------------------------------------------------------------------------------- /debian/tests/srcs/test/demo1.cpp: -------------------------------------------------------------------------------- 1 | // boost1.67-1.67.0/libs/test/example/named_param_example.cpp 2 | 3 | // (C) Copyright Gennadiy Rozental 2001-2014. 4 | // Distributed under the Boost Software License, Version 1.0. 5 | // (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt) 7 | 8 | // See http://www.boost.org/libs/test for the library home page. 9 | 10 | // Library Code 11 | #include 12 | 13 | using namespace boost::nfp; 14 | 15 | //////////////////////////////////////////////////////////////// 16 | // Example: 17 | 18 | #include 19 | #include 20 | 21 | namespace test { 22 | typed_keyword name; 23 | typed_keyword index; 24 | keyword value; 25 | keyword instance; 26 | keyword ref; 27 | 28 | template 29 | void foo1( char const* n, ValueType v, int i ) 30 | { 31 | std::cout << n << '[' << i << "]=" << v << std::endl; 32 | } 33 | 34 | template 35 | void foo(Params const& params) 36 | { 37 | int i = params[index]; 38 | foo1( params[name], params[value], i ); 39 | } 40 | 41 | template 42 | void boo(Params const& params) 43 | { 44 | foo1( params[name], params[value], params.has(index) ? params[index] : 0 ); 45 | } 46 | 47 | template 48 | void doo(Params const& params) 49 | { 50 | char const* nm; 51 | if( params.has(name) ) 52 | nm = params[name]; 53 | else 54 | nm = "abc"; 55 | foo1( nm, params[value], params.has(index) ? params[index] : 0 ); 56 | } 57 | 58 | template 59 | void moo1( T* t ) 60 | { 61 | std::cout << "non shared " << *t << std::endl; 62 | } 63 | 64 | template 65 | void moo1( boost::shared_ptr const& t ) 66 | { 67 | std::cout << "shared " << *t << std::endl; 68 | } 69 | 70 | template 71 | void moo(Params const& params) 72 | { 73 | moo1( params[instance] ); 74 | } 75 | 76 | template 77 | void goo(Params const& params) 78 | { 79 | params[ref] = 6; 80 | } 81 | } 82 | 83 | int main() 84 | { 85 | using test::foo; 86 | using test::boo; 87 | using test::moo; 88 | using test::doo; 89 | using test::goo; 90 | using test::name; 91 | using test::value; 92 | using test::index; 93 | using test::instance; 94 | using test::ref; 95 | 96 | foo(( name = "foo", index = 0, value = 2.5 )); 97 | foo(( value = 'a', index = 1, name = "foo" )); 98 | foo(( name = "foo", value = "abc", index = 1 )); 99 | 100 | try { 101 | foo(( name = "foo", value = "abc" )); 102 | } 103 | catch( nfp_detail::access_to_invalid_parameter const& ) { 104 | std::cout << "Got access_to_invalid_parameter" << std::endl; 105 | } 106 | 107 | boo(( name = "boo", value = "abc" )); 108 | boo(( name = "boo", index = 1, value = "abc" )); 109 | doo(( value = "abc" )); 110 | doo(( value = 1.56, name = "ytr" )); 111 | 112 | int i = 5; 113 | 114 | moo( instance = &i ); 115 | moo( instance = boost::shared_ptr( new float(1.2) ) ); 116 | 117 | goo( ref = i ); 118 | 119 | return 0; 120 | } 121 | 122 | // EOF 123 | -------------------------------------------------------------------------------- /debian/tests/srcs/thread/demo1.cpp: -------------------------------------------------------------------------------- 1 | // boost1.67-1.67.0/libs/thread/example/tennis.cpp 2 | 3 | // Copyright (C) 2001-2003 4 | // William E. Kempf 5 | // 6 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 7 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 8 | 9 | #undef BOOST_THREAD_VERSION 10 | #define BOOST_THREAD_VERSION 2 11 | 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #if defined(BOOST_HAS_WINTHREADS) 19 | # include 20 | # include 21 | #endif 22 | 23 | enum game_state 24 | { 25 | START, 26 | PLAYER_A, 27 | PLAYER_B, 28 | GAME_OVER, 29 | ONE_PLAYER_GONE, 30 | BOTH_PLAYERS_GONE 31 | }; 32 | 33 | int state; 34 | boost::mutex mutex; 35 | boost::condition cond; 36 | 37 | const char* player_name(int state) 38 | { 39 | if (state == PLAYER_A) 40 | return "PLAYER-A"; 41 | if (state == PLAYER_B) 42 | return "PLAYER-B"; 43 | throw "bad player"; 44 | //return 0; 45 | } 46 | 47 | void player(int active) 48 | { 49 | boost::unique_lock lock(mutex); 50 | 51 | int other = active == PLAYER_A ? PLAYER_B : PLAYER_A; 52 | 53 | while (state < GAME_OVER) 54 | { 55 | //std::cout << player_name(active) << ": Play." << std::endl; 56 | state = other; 57 | cond.notify_all(); 58 | do 59 | { 60 | cond.wait(lock); 61 | if (state == other) 62 | { 63 | std::cout << "---" << player_name(active) 64 | << ": Spurious wakeup!" << std::endl; 65 | } 66 | } while (state == other); 67 | } 68 | 69 | ++state; 70 | std::cout << player_name(active) << ": Gone." << std::endl; 71 | cond.notify_all(); 72 | } 73 | 74 | struct thread_adapt 75 | { 76 | thread_adapt(void (*func)(void*), void* param) 77 | : _func(func), _param(param) 78 | { 79 | } 80 | int operator()() const 81 | { 82 | _func(_param); 83 | return 0; 84 | } 85 | 86 | void (*_func)(void*); 87 | void* _param; 88 | }; 89 | 90 | class thread_adapter 91 | { 92 | public: 93 | thread_adapter(void (*func)(void*), void* param) 94 | : _func(func), _param(param) 95 | { 96 | } 97 | void operator()() const { _func(_param); } 98 | private: 99 | void (*_func)(void*); 100 | void* _param; 101 | }; 102 | 103 | int main() 104 | { 105 | state = START; 106 | 107 | boost::thread thrda(&player, PLAYER_A); 108 | boost::thread thrdb(&player, PLAYER_B); 109 | 110 | boost::xtime xt; 111 | boost::xtime_get(&xt, boost::TIME_UTC_); 112 | xt.sec += 1; 113 | boost::thread::sleep(xt); 114 | { 115 | boost::unique_lock lock(mutex); 116 | std::cout << "---Noise ON..." << std::endl; 117 | } 118 | 119 | for (int i = 0; i < 10; ++i) 120 | cond.notify_all(); 121 | 122 | { 123 | boost::unique_lock lock(mutex); 124 | std::cout << "---Noise OFF..." << std::endl; 125 | state = GAME_OVER; 126 | cond.notify_all(); 127 | do 128 | { 129 | cond.wait(lock); 130 | } while (state != BOTH_PLAYERS_GONE); 131 | } 132 | 133 | std::cout << "GAME OVER" << std::endl; 134 | 135 | thrda.join(); 136 | thrdb.join(); 137 | 138 | return 0; 139 | } 140 | -------------------------------------------------------------------------------- /debian/tests/srcs/graph-parallel/demo1.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2004-2008 The Trustees of Indiana University. 2 | 3 | // Use, modification and distribution is subject to the Boost Software 4 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt) 6 | 7 | // Authors: Douglas Gregor 8 | // Andrew Lumsdaine 9 | 10 | // Example usage of breadth_first_search algorithm 11 | 12 | // Enable PBGL interfaces to BGL algorithms 13 | #include 14 | 15 | // Communicate via MPI 16 | #include 17 | 18 | // Breadth-first search algorithm 19 | #include 20 | 21 | // Distributed adjacency list 22 | #include 23 | 24 | // METIS Input 25 | #include 26 | 27 | // Graphviz Output 28 | #include 29 | 30 | // For choose_min_reducer 31 | #include 32 | 33 | // Standard Library includes 34 | #include 35 | #include 36 | 37 | #ifdef BOOST_NO_EXCEPTIONS 38 | void 39 | boost::throw_exception(std::exception const& ex) 40 | { 41 | std::cout << ex.what() << std::endl; 42 | abort(); 43 | } 44 | #endif 45 | 46 | using namespace boost; 47 | using boost::graph::distributed::mpi_process_group; 48 | 49 | /* An undirected graph with distance values stored on the vertices. */ 50 | typedef adjacency_list, undirectedS, 51 | /*Vertex properties=*/property > 52 | Graph; 53 | 54 | int main(int argc, char* argv[]) 55 | { 56 | boost::mpi::environment env(argc,argv); 57 | 58 | // Parse command-line options 59 | const char* filename = "weighted_graph.gr"; 60 | if (argc > 1) filename = argv[1]; 61 | 62 | // Open the METIS input file 63 | std::ifstream in(filename); 64 | graph::metis_reader reader(in); 65 | 66 | // Load the graph using the default distribution 67 | Graph g(reader.begin(), reader.end(), 68 | reader.num_vertices()); 69 | 70 | // Get vertex 0 in the graph 71 | graph_traits::vertex_descriptor start = vertex(0, g); 72 | 73 | // Compute BFS levels from vertex 0 74 | property_map::type distance = 75 | get(vertex_distance, g); 76 | 77 | // Initialize distances to infinity and set reduction operation to 'min' 78 | BGL_FORALL_VERTICES(v, g, Graph) { 79 | put(distance, v, (std::numeric_limits::max)()); 80 | } 81 | distance.set_reduce(boost::graph::distributed::choose_min_reducer()); 82 | 83 | put(distance, start, 0); 84 | breadth_first_search 85 | (g, start, 86 | visitor(make_bfs_visitor(record_distances(distance, on_tree_edge())))); 87 | 88 | // Output a Graphviz DOT file 89 | std::string outfile; 90 | 91 | if (argc > 2) 92 | outfile = argv[2]; 93 | else { 94 | outfile = filename; 95 | size_t i = outfile.rfind('.'); 96 | if (i != std::string::npos) 97 | outfile.erase(outfile.begin() + i, outfile.end()); 98 | outfile += "-bfs.dot"; 99 | } 100 | 101 | if (process_id(process_group(g)) == 0) { 102 | std::cout << "Writing GraphViz output to " << outfile << "... "; 103 | std::cout.flush(); 104 | } 105 | write_graphviz(outfile, g, 106 | make_label_writer(distance)); 107 | if (process_id(process_group(g)) == 0) 108 | std::cout << "Done." << std::endl; 109 | 110 | return 0; 111 | } 112 | -------------------------------------------------------------------------------- /debian/update-control.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | from deb822 import Deb822 4 | import re 5 | 6 | gOldVersion = None 7 | gNewVersion = None 8 | 9 | 10 | class BoostVersion: 11 | def __init__(self, version): 12 | (self.Major,self.Minor,self.Revision) = version.split('.') 13 | self.PackageVersion = self.Major + '.' + self.Minor 14 | self.SharedObjectVersion = version 15 | def containsPackageVersion(self, string): 16 | '''Return true if 'string' contains the Package version string.''' 17 | return re.search(self.PackageVersion, string) is not None 18 | def containsSharedObjectVersion(self, string): 19 | '''Return true if 'string' contains the Shared Object version string.''' 20 | return re.search(self.SharedObjectVersion, string) is not None 21 | def stripVersion(self, string): 22 | '''Remove PackageVersion or SharedObjectVersion if contained in 'string'.''' 23 | return self.replaceVersion(string,'') 24 | def replaceVersion(self, string, replacement): 25 | '''Replace either PackageVersion or SharedObjectVersion if contained in 'string', 26 | with 'replacement'.''' 27 | string = re.sub(self.SharedObjectVersion, replacement, string) 28 | string = re.sub(self.PackageVersion, replacement, string) 29 | return string 30 | 31 | def replaceVersion(string, ver1, ver2): 32 | '''Search 'string' for a BoostVersion ver1. If 33 | SharedObjectVersion or PackageVersion of ver1 is found, replace by 34 | corresponding ver2 version string. Return the updated string.''' 35 | string = re.sub(ver1.SharedObjectVersion, ver2.SharedObjectVersion, string) 36 | string = re.sub(ver1.PackageVersion, ver2.PackageVersion, string) 37 | return string 38 | 39 | def updateVersionedValue(paragraph, key): 40 | if key not in paragraph: return 41 | oldValue = paragraph[key] 42 | paragraph[key] = replaceVersion(paragraph[key], gOldVersion, gNewVersion) 43 | return (oldValue, paragraph[key]) 44 | 45 | def conflictsWithPrevious(paragraph): 46 | if 'Conflicts' not in paragraph: return False 47 | nameRe = re.sub('\\d', '\\\\d', paragraph['Package']) 48 | return re.search(nameRe, paragraph['Conflicts']) is not None 49 | 50 | def updateConflicts(paragraph, oldPkgName): 51 | newPkgName = paragraph['Package'] 52 | needsConflict = (newPkgName.endswith("-dev") and not newPkgName.endswith("-all-dev")) or conflictsWithPrevious(paragraph) 53 | if not needsConflict: return 54 | if 'Conflicts' in paragraph: 55 | if paragraph['Conflicts'].find(oldPkgName) == -1: 56 | paragraph['Conflicts'] += ', ' + oldPkgName 57 | else: 58 | paragraph['Conflicts'] = oldPkgName 59 | 60 | def processSourceParagraph(p): 61 | updateVersionedValue(p, 'Source') 62 | 63 | def processPackageParagraph(p): 64 | (oldPkgName, newPkgName) = updateVersionedValue(p, 'Package') 65 | updateVersionedValue(p, 'Depends') 66 | updateVersionedValue(p, 'Recommends') 67 | updateVersionedValue(p, 'Suggests') 68 | updateConflicts(p, oldPkgName) 69 | 70 | def printParagraph(p): 71 | for key in list(p.keys()): 72 | print("%s: %s" % (key, p[key])) 73 | 74 | def processControl(): 75 | firstParagraph = True 76 | for paragraph in Deb822.iter_paragraphs(open('control')): 77 | if firstParagraph: 78 | processSourceParagraph(paragraph) 79 | printParagraph(paragraph) 80 | firstParagraph = False 81 | else: 82 | processPackageParagraph(paragraph) 83 | print() 84 | printParagraph(paragraph) 85 | 86 | 87 | 88 | gOldVersion = BoostVersion('1.80.0') 89 | gNewVersion = BoostVersion('1.81.0') 90 | processControl() 91 | -------------------------------------------------------------------------------- /debian/generate-docfiles-list.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 2 | 3 | import os, pwd, re, sys 4 | from subprocess import call, check_call 5 | 6 | def extract_tar(tarfile,rootdir): 7 | """Extract files from a tar archive. 8 | 9 | Arguments: 10 | tarfile -- file name of tar archive 11 | rootdir -- directory into which the archive is extracted 12 | 13 | """ 14 | cmd = ["tar","--extract"] 15 | 16 | if tarfile.endswith(".gz"): 17 | cmd.append("--gzip") 18 | elif tarfile.endswith(".bz2"): 19 | cmd.append("--bzip") 20 | 21 | cmd.append("--file") 22 | cmd.append(os.path.abspath(tarfile)) 23 | 24 | check_call(cmd, cwd=rootdir, universal_newlines=True) 25 | 26 | 27 | def wget_localhost_files(serverbase,tempdir): 28 | """Use wget to obtain files from localhost server. 29 | 30 | server -- root of file tree on http://localhost 31 | tempdir -- directory into which the files are placed 32 | 33 | """ 34 | cmd = ["wget", "--quiet", 35 | "--recursive", "--no-parent", 36 | "--domains=localhost", 37 | "http://localhost/" + serverbase] 38 | retcode = call(cmd, cwd=tempdir, universal_newlines=True) 39 | if retcode not in [0, 8]: 40 | raise RuntimeError("wget failed") 41 | 42 | def find_file_root(dirname,filename): 43 | """Recursively search the dir for a file.""" 44 | while 1: 45 | #print "Considering " + dirname 46 | if not os.path.isdir(dirname): return None 47 | files = os.listdir(dirname) 48 | if len(files) == 1: 49 | dirname = os.path.abspath(os.path.join(dirname,files[0])) 50 | else: 51 | if filename in files: 52 | return dirname 53 | return None 54 | 55 | def list_doc_files(rootdir,src_rootdir): 56 | """List files comprising the Boost documentation tree. 57 | 58 | Returns list of filenames, relative to given rootdir, that 59 | make up the Boost documentation. This is all files that: 60 | (a) are not in subdir $rootdir/boost AND 61 | (b) endswith .html or .htm OR 62 | is a file in $src_rootdir 63 | 64 | """ 65 | doc_files = [] 66 | for dirpath, dirs, files in os.walk(rootdir): 67 | if dirpath == rootdir: 68 | dirs.remove("boost") 69 | for filename in files: 70 | #print "Considering: ", filename 71 | filepath = os.path.abspath(os.path.join(dirpath,filename)) 72 | filepath = filepath.replace(rootdir,"",1) 73 | if filepath.startswith("/"): 74 | filepath = filepath[1:] 75 | keep = filename.endswith(".html") or \ 76 | filename.endswith(".htm") or \ 77 | os.path.exists(os.path.join(src_rootdir,filename)) 78 | if keep: 79 | doc_files.append(filepath) 80 | #print filepath 81 | 82 | return doc_files 83 | 84 | 85 | def main(): 86 | if (len(sys.argv) != 3): 87 | print("Usage: %s tarfile boost_x_y_z" % sys.argv[0]) 88 | return 1 89 | tarfile, path = sys.argv[1:3] 90 | tar_extract_root = os.path.expanduser("~/public_html") 91 | url_root = "~" + pwd.getpwuid(os.getuid()).pw_name + "/" + path + "/index.html" 92 | 93 | extract_tar(tarfile, tar_extract_root) 94 | check_call(["chmod", "-R", "+x", tar_extract_root+'/'+path]) 95 | wget_localhost_files(url_root, "/tmp") 96 | boost_dir = find_file_root("/tmp/localhost", "boost") 97 | files = list_doc_files(boost_dir, 98 | os.path.join(tar_extract_root,path)) 99 | files.sort() 100 | for f in files: 101 | print(f) 102 | 103 | main() 104 | -------------------------------------------------------------------------------- /debian/tests/srcs/datetime/demo2.cpp: -------------------------------------------------------------------------------- 1 | /* The following shows the creation of a facet for the output of 2 | * dates in German (please forgive me for any errors in my German -- 3 | * I'm not a native speaker). 4 | */ 5 | 6 | #include "boost/date_time/gregorian/gregorian.hpp" 7 | #include 8 | #include 9 | 10 | /* Define a series of char arrays for short and long name strings 11 | * to be associated with German date output (US names will be 12 | * retrieved from the locale). */ 13 | const char* const de_short_month_names[] = 14 | { 15 | "Jan", "Feb", "Mar", "Apr", "Mai", "Jun", 16 | "Jul", "Aug", "Sep", "Okt", "Nov", "Dez", "NAM" 17 | }; 18 | const char* const de_long_month_names[] = 19 | { 20 | "Januar", "Februar", "Marz", "April", "Mai", 21 | "Juni", "Juli", "August", "September", "Oktober", 22 | "November", "Dezember", "NichtDerMonat" 23 | }; 24 | const char* const de_long_weekday_names[] = 25 | { 26 | "Sonntag", "Montag", "Dienstag", "Mittwoch", 27 | "Donnerstag", "Freitag", "Samstag" 28 | }; 29 | const char* const de_short_weekday_names[] = 30 | { 31 | "Son", "Mon", "Die","Mit", "Don", "Fre", "Sam" 32 | }; 33 | 34 | 35 | int main() 36 | { 37 | using namespace boost::gregorian; 38 | 39 | // create some gregorian objects to output 40 | date d1(2002, Oct, 1); 41 | greg_month m = d1.month(); 42 | greg_weekday wd = d1.day_of_week(); 43 | 44 | // create a facet and a locale for German dates 45 | date_facet* german_facet = new date_facet(); 46 | std::cout.imbue(std::locale(std::locale::classic(), german_facet)); 47 | 48 | // create the German name collections 49 | date_facet::input_collection_type short_months, long_months, 50 | short_weekdays, long_weekdays; 51 | std::copy(&de_short_month_names[0], &de_short_month_names[11], 52 | std::back_inserter(short_months)); 53 | std::copy(&de_long_month_names[0], &de_long_month_names[11], 54 | std::back_inserter(long_months)); 55 | std::copy(&de_short_weekday_names[0], &de_short_weekday_names[6], 56 | std::back_inserter(short_weekdays)); 57 | std::copy(&de_long_weekday_names[0], &de_long_weekday_names[6], 58 | std::back_inserter(long_weekdays)); 59 | 60 | // replace the default names with ours 61 | // NOTE: date_generators and special_values were not replaced as 62 | // they are not used in this example 63 | german_facet->short_month_names(short_months); 64 | german_facet->long_month_names(long_months); 65 | german_facet->short_weekday_names(short_weekdays); 66 | german_facet->long_weekday_names(long_weekdays); 67 | 68 | // output the date in German using short month names 69 | german_facet->format("%d.%m.%Y"); 70 | std::cout << d1 << std::endl; //01.10.2002 71 | 72 | german_facet->month_format("%B"); 73 | std::cout << m << std::endl; //Oktober 74 | 75 | german_facet->weekday_format("%A"); 76 | std::cout << wd << std::endl; //Dienstag 77 | 78 | 79 | // Output the same gregorian objects using US names 80 | date_facet* us_facet = new date_facet(); 81 | std::cout.imbue(std::locale(std::locale::classic(), us_facet)); 82 | 83 | us_facet->format("%m/%d/%Y"); 84 | std::cout << d1 << std::endl; // 10/01/2002 85 | 86 | // English names, ISO 8601 order (year-month-day), '-' separator 87 | us_facet->format("%Y-%b-%d"); 88 | std::cout << d1 << std::endl; // 2002-Oct-01 89 | 90 | return 0; 91 | 92 | } 93 | 94 | /* Copyright 2001-2005: CrystalClear Software, Inc 95 | * http://www.crystalclearsoftware.com 96 | * 97 | * Subject to the Boost Software License, Version 1.0. 98 | * (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) 99 | */ 100 | 101 | -------------------------------------------------------------------------------- /debian/tests/srcs/program-options/demo2.cpp: -------------------------------------------------------------------------------- 1 | // boost1.67-1.67.0/libs/program-options/example/multiple_sources.cpp 2 | 3 | 4 | // Copyright Vladimir Prus 2002-2004. 5 | // Distributed under the Boost Software License, Version 1.0. 6 | // (See accompanying file LICENSE_1_0.txt 7 | // or copy at http://www.boost.org/LICENSE_1_0.txt) 8 | 9 | /* Shows how to use both command line and config file. */ 10 | 11 | #include 12 | namespace po = boost::program_options; 13 | 14 | 15 | #include 16 | #include 17 | #include 18 | using namespace std; 19 | 20 | // A helper function to simplify the main part. 21 | template 22 | ostream& operator<<(ostream& os, const vector& v) 23 | { 24 | copy(v.begin(), v.end(), ostream_iterator(os, " ")); 25 | return os; 26 | } 27 | 28 | 29 | int main(int ac, char* av[]) 30 | { 31 | try { 32 | int opt; 33 | string config_file; 34 | 35 | // Declare a group of options that will be 36 | // allowed only on command line 37 | po::options_description generic("Generic options"); 38 | generic.add_options() 39 | ("version,v", "print version string") 40 | ("help", "produce help message") 41 | ("config,c", po::value(&config_file)->default_value("multiple_sources.cfg"), 42 | "name of a file of a configuration.") 43 | ; 44 | 45 | // Declare a group of options that will be 46 | // allowed both on command line and in 47 | // config file 48 | po::options_description config("Configuration"); 49 | config.add_options() 50 | ("optimization", po::value(&opt)->default_value(10), 51 | "optimization level") 52 | ("include-path,I", 53 | po::value< vector >()->composing(), 54 | "include path") 55 | ; 56 | 57 | // Hidden options, will be allowed both on command line and 58 | // in config file, but will not be shown to the user. 59 | po::options_description hidden("Hidden options"); 60 | hidden.add_options() 61 | ("input-file", po::value< vector >(), "input file") 62 | ; 63 | 64 | 65 | po::options_description cmdline_options; 66 | cmdline_options.add(generic).add(config).add(hidden); 67 | 68 | po::options_description config_file_options; 69 | config_file_options.add(config).add(hidden); 70 | 71 | po::options_description visible("Allowed options"); 72 | visible.add(generic).add(config); 73 | 74 | po::positional_options_description p; 75 | p.add("input-file", -1); 76 | 77 | po::variables_map vm; 78 | store(po::command_line_parser(ac, av). 79 | options(cmdline_options).positional(p).run(), vm); 80 | notify(vm); 81 | 82 | ifstream ifs(config_file.c_str()); 83 | if (!ifs) 84 | { 85 | cout << "can not open config file: " << config_file << "\n"; 86 | return 0; 87 | } 88 | else 89 | { 90 | store(parse_config_file(ifs, config_file_options), vm); 91 | notify(vm); 92 | } 93 | 94 | if (vm.count("help")) { 95 | cout << visible << "\n"; 96 | return 0; 97 | } 98 | 99 | if (vm.count("version")) { 100 | cout << "Multiple sources example, version 1.0\n"; 101 | return 0; 102 | } 103 | 104 | if (vm.count("include-path")) 105 | { 106 | cout << "Include paths are: " 107 | << vm["include-path"].as< vector >() << "\n"; 108 | } 109 | 110 | if (vm.count("input-file")) 111 | { 112 | cout << "Input files are: " 113 | << vm["input-file"].as< vector >() << "\n"; 114 | } 115 | 116 | cout << "Optimization level is " << opt << "\n"; 117 | } 118 | catch(exception& e) 119 | { 120 | cout << e.what() << "\n"; 121 | return 1; 122 | } 123 | return 0; 124 | } 125 | -------------------------------------------------------------------------------- /debian/tests/srcs/thread/demo2.cpp: -------------------------------------------------------------------------------- 1 | // boost1.67-1.67.0/libs/thread/example/producer_consumer.cpp 2 | 3 | 4 | // (C) Copyright 2012 Howard Hinnant 5 | // (C) Copyright 2012 Vicente Botet 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | 10 | // adapted from the example given by Howard Hinnant in 11 | 12 | #include 13 | 14 | #define BOOST_THREAD_VERSION 4 15 | #define BOOST_THREAD_QUEUE_DEPRECATE_OLD 16 | #if ! defined BOOST_NO_CXX11_DECLTYPE 17 | #define BOOST_RESULT_OF_USE_DECLTYPE 18 | #endif 19 | #include 20 | #include 21 | #ifdef XXXX 22 | #include 23 | typedef boost::externally_locked_stream the_ostream; 24 | #else 25 | typedef std::ostream the_ostream; 26 | typedef std::istream the_istream; 27 | #endif 28 | #include 29 | 30 | void producer(the_ostream & /*mos*/, boost::sync_queue & sbq) 31 | { 32 | using namespace boost; 33 | try { 34 | for(int i=0; ;++i) 35 | { 36 | sbq.push(i); 37 | //sbq << i; 38 | //mos << "push(" << i << ") "<< sbq.size()<<"\n"; 39 | this_thread::sleep_for(chrono::milliseconds(200)); 40 | } 41 | } 42 | catch(sync_queue_is_closed&) 43 | { 44 | //mos << "closed !!!\n"; 45 | } 46 | catch(...) 47 | { 48 | //mos << "exception !!!\n"; 49 | } 50 | } 51 | 52 | void consumer( 53 | the_ostream & /*mos*/, 54 | boost::sync_queue & sbq) 55 | { 56 | using namespace boost; 57 | try { 58 | for(int i=0; ;++i) 59 | { 60 | int r; 61 | sbq.pull(r); 62 | //sbq >> r; 63 | //mos << i << " pull(" << r << ") "<< sbq.size()<<"\n"; 64 | 65 | this_thread::sleep_for(chrono::milliseconds(250)); 66 | } 67 | } 68 | catch(sync_queue_is_closed&) 69 | { 70 | //mos << "closed !!!\n"; 71 | } 72 | catch(...) 73 | { 74 | //mos << "exception !!!\n"; 75 | } 76 | } 77 | void consumer2(the_ostream &/*mos*/, boost::sync_queue & sbq) 78 | { 79 | using namespace boost; 80 | try { 81 | for(int i=0; ;++i) 82 | { 83 | int r; 84 | queue_op_status st = sbq.try_pull(r); 85 | if (queue_op_status::closed == st) break; 86 | if (queue_op_status::success == st) { 87 | //mos << i << " pull(" << r << ")\n"; 88 | } 89 | this_thread::sleep_for(chrono::milliseconds(250)); 90 | } 91 | } 92 | catch(...) 93 | { 94 | //mos << "exception !!!\n"; 95 | } 96 | } 97 | void consumer3(the_ostream &/*mos*/, boost::sync_queue & sbq) 98 | { 99 | using namespace boost; 100 | try { 101 | for(int i=0; ;++i) 102 | { 103 | int r; 104 | queue_op_status res = sbq.wait_pull(r); 105 | if (res==queue_op_status::closed) break; 106 | //mos << i << " wait_pull(" << r << ")\n"; 107 | this_thread::sleep_for(chrono::milliseconds(250)); 108 | } 109 | } 110 | catch(...) 111 | { 112 | //mos << "exception !!!\n"; 113 | } 114 | } 115 | 116 | int main() 117 | { 118 | using namespace boost; 119 | 120 | #ifdef XXXX 121 | recursive_mutex terminal_mutex; 122 | 123 | externally_locked_stream mcerr(std::cerr, terminal_mutex); 124 | externally_locked_stream mcout(std::cout, terminal_mutex); 125 | externally_locked_stream mcin(std::cin, terminal_mutex); 126 | #else 127 | the_ostream &mcerr = std::cout; 128 | the_ostream &mcout = std::cout; 129 | //the_istream &mcin = std::cin; 130 | #endif 131 | 132 | sync_queue sbq; 133 | 134 | { 135 | mcout << "begin of main" << std::endl; 136 | scoped_thread<> t11(boost::thread(producer, boost::ref(mcerr), boost::ref(sbq))); 137 | scoped_thread<> t12(boost::thread(producer, boost::ref(mcerr), boost::ref(sbq))); 138 | scoped_thread<> t2(boost::thread(consumer, boost::ref(mcout), boost::ref(sbq))); 139 | 140 | this_thread::sleep_for(chrono::seconds(1)); 141 | 142 | mcout << "closed()" << std::endl; 143 | sbq.close(); 144 | mcout << "closed()" << std::endl; 145 | 146 | } // all threads joined here. 147 | mcout << "end of main" << std::endl; 148 | return 0; 149 | } 150 | 151 | -------------------------------------------------------------------------------- /debian/tests/srcs/log/demo2.cpp: -------------------------------------------------------------------------------- 1 | // boost1.67-1.67.0/libs/log/example/async_log/main.cpp 2 | 3 | /* 4 | * Copyright Andrey Semashev 2007 - 2015. 5 | * Distributed under the Boost Software License, Version 1.0. 6 | * (See accompanying file LICENSE_1_0.txt or copy at 7 | * http://www.boost.org/LICENSE_1_0.txt) 8 | */ 9 | /*! 10 | * \file main.cpp 11 | * \author Andrey Semashev 12 | * \date 30.08.2009 13 | * 14 | * \brief An example of asynchronous logging in multiple threads. 15 | */ 16 | 17 | #define BOOST_LOG_DYN_LINK 1 18 | 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | 38 | namespace logging = boost::log; 39 | namespace attrs = boost::log::attributes; 40 | namespace src = boost::log::sources; 41 | namespace sinks = boost::log::sinks; 42 | namespace expr = boost::log::expressions; 43 | namespace keywords = boost::log::keywords; 44 | 45 | using boost::shared_ptr; 46 | 47 | enum 48 | { 49 | LOG_RECORDS_TO_WRITE = 10000, 50 | THREAD_COUNT = 2 51 | }; 52 | 53 | BOOST_LOG_INLINE_GLOBAL_LOGGER_DEFAULT(test_lg, src::logger_mt) 54 | 55 | //! This function is executed in multiple threads 56 | void thread_fun(boost::barrier& bar) 57 | { 58 | // Wait until all threads are created 59 | bar.wait(); 60 | 61 | // Here we go. First, identify the thread. 62 | BOOST_LOG_SCOPED_THREAD_TAG("ThreadID", boost::this_thread::get_id()); 63 | 64 | // Now, do some logging 65 | for (unsigned int i = 0; i < LOG_RECORDS_TO_WRITE; ++i) 66 | { 67 | BOOST_LOG(test_lg::get()) << "Log record " << i; 68 | } 69 | } 70 | 71 | int main(int argc, char* argv[]) 72 | { 73 | try 74 | { 75 | // Open a rotating text file 76 | shared_ptr< std::ostream > strm(new std::ofstream("test.log")); 77 | if (!strm->good()) 78 | throw std::runtime_error("Failed to open a text log file"); 79 | 80 | // Create a text file sink 81 | typedef sinks::text_ostream_backend backend_t; 82 | typedef sinks::asynchronous_sink< 83 | backend_t, 84 | sinks::unbounded_ordering_queue< 85 | logging::attribute_value_ordering< unsigned int, std::less< unsigned int > > 86 | > 87 | > sink_t; 88 | shared_ptr< sink_t > sink(new sink_t( 89 | boost::make_shared< backend_t >(), 90 | // We'll apply record ordering to ensure that records from different threads go sequentially in the file 91 | keywords::order = logging::make_attr_ordering("RecordID", std::less< unsigned int >()))); 92 | 93 | sink->locked_backend()->add_stream(strm); 94 | 95 | sink->set_formatter 96 | ( 97 | expr::format("%1%: [%2%] [%3%] - %4%") 98 | % expr::attr< unsigned int >("RecordID") 99 | % expr::attr< boost::posix_time::ptime >("TimeStamp") 100 | % expr::attr< boost::thread::id >("ThreadID") 101 | % expr::smessage 102 | ); 103 | 104 | // Add it to the core 105 | logging::core::get()->add_sink(sink); 106 | 107 | // Add some attributes too 108 | logging::core::get()->add_global_attribute("TimeStamp", attrs::local_clock()); 109 | logging::core::get()->add_global_attribute("RecordID", attrs::counter< unsigned int >()); 110 | 111 | // Create logging threads 112 | boost::barrier bar(THREAD_COUNT); 113 | boost::thread_group threads; 114 | for (unsigned int i = 0; i < THREAD_COUNT; ++i) 115 | threads.create_thread(boost::bind(&thread_fun, boost::ref(bar))); 116 | 117 | // Wait until all action ends 118 | threads.join_all(); 119 | 120 | // Flush all buffered records 121 | sink->stop(); 122 | sink->flush(); 123 | 124 | return 0; 125 | } 126 | catch (std::exception& e) 127 | { 128 | std::cout << "FAILURE: " << e.what() << std::endl; 129 | return 1; 130 | } 131 | } 132 | -------------------------------------------------------------------------------- /debian/NEWS.old: -------------------------------------------------------------------------------- 1 | boost1.53 (1.53.0-1) unstable; urgency=low 2 | 3 | Debian no longer ships the "libboost_foo-mt" compatibility symlinks. 4 | Use "-lboost_foo" only. 5 | 6 | -- Steve M. Robbins Sat, 09 Feb 2013 21:12:14 -0600 7 | 8 | boost1.46 (1.46.1-3) unstable; urgency=low 9 | 10 | Boost.Build and bjam now ship in the main -dev package (currently 11 | libboost1.46-dev). Packages boost-build and bjam are obsolete and to 12 | be removed from the archive. 13 | 14 | -- Steve M. Robbins Sat, 19 Mar 2011 18:26:39 -0500 15 | 16 | boost1.39 (1.39.0-4) unstable; urgency=low 17 | 18 | Since only one (the multi-threaded) variant of each library is built, 19 | upstream elected to simplify the library name by removing the 20 | redundant "-mt" decoration. Debian will follow this convention, to 21 | remain compatible at link time with other vendors. The preferred form 22 | of the link option is now "-lboost_regex", etc. 23 | 24 | In response to the Debian 1.37 package, a number of boost-using 25 | packages changed their build system to add "-mt"; see entry below. To 26 | avoid breaking all these packages, Debian is providing compatibility 27 | symlinks with the "-mt" decoration; e.g. "-lboost_regex-mt" continues 28 | to work. However, note that this name is not compatible with other 29 | distributions, so build-system authors are encouraged to use the 30 | undecorated name. 31 | 32 | -- Steve M. Robbins Sun, 30 Aug 2009 14:47:14 -0500 33 | 34 | boost1.37 (1.37.0-1) unstable; urgency=low 35 | 36 | The single-threaded variant of the libraries is no longer built. 37 | Prior to this, -lboost_regex was the single-threaded variant and 38 | -lboost_regex-mt was the multi-threaded variant of Boost.Regex. Any 39 | software using "-lboost_regex" will need to now use "-lboost_regex-mt" 40 | instead (and similar for all other libraries, of course). 41 | 42 | -- Steve M. Robbins Sun, 09 Nov 2008 15:46:50 -0600 43 | 44 | boost1.35 (1.35.0-1) unstable; urgency=low 45 | 46 | All packages now incorporate the boost version. The -doc, -dbg, and 47 | -dev packages are labelled with 1.35 under the assumption that 1.35.x 48 | will all be API compatible. The shared lib packages are labelled with 49 | the SOVERSION (1.35.0) as always. The new packages conflict with the 50 | old (versions 1.34.x) since they install into the same directories. 51 | The new packages have a new source name, however, so both 1.34 and 52 | 1.35 will be available from the Debian repository. 53 | 54 | Removed package bcp. The binary "bcp" is now found in libboost-dev. 55 | 56 | Removed package pyste. The binary "pyste" is now found in 57 | libboost-python-dev. 58 | 59 | -- Steve M. Robbins Wed, 07 May 2008 02:38:44 -0500 60 | 61 | boost (1.34.0-1) unstable; urgency=low 62 | 63 | The boost library short name has changed semantics in Debian. Prior to 64 | 1.34.0-1, the short name was multi-threaded. Now it is single 65 | threaded. 66 | 67 | Boost library names encode the SOVERSION and build characteristics of 68 | the library, including the compiler used (gcc41) and whether 69 | multi-threading is enabled (-mt if so). This leads to long names like 70 | libboost_wserialization-gcc42-mt-1_34_1.so.1.34.1 71 | [http://www.boost.org/more/getting_started/unix-variants.html#library-naming] 72 | that are hard to discover in the build system of boost-using software. 73 | 74 | Prior to 1.34.0-1, Debian packages provided a NON-PORTABLE short form 75 | of the library name as a convenience. The short form 76 | (e.g. libboost_wserialization.so) did not have the compiler or "-mt" 77 | strings in the name, even though it was the multi-thread flavour. 78 | 79 | Other distributions, e.g. Fedora, use the so-called "layout=system" 80 | install and also have shorter-named boost libraries. However, the 81 | short-named libraries are the single-threaded flavour. The 82 | multi-threaded flavour has "-mt" appended, 83 | e.g. libboost_wserialization-mt.so). 84 | 85 | After some discussion, both internal and on bug reports #429533, 86 | #424038, #425264, #428419, #431502, and #425992, we decided to bring 87 | the Debian names in line with "layout=system", hence compatible with 88 | other distributions. This means that the short name has changed 89 | semantics from being the multi-threaded flavour to being now the 90 | single-threaded flavour. 91 | 92 | To summarize: if you're linking to libboostX for a multi-threaded 93 | application, append "-mt". 94 | 95 | -- Domenico Andreoli Mon, 14 May 2007 00:06:49 +0200 96 | -------------------------------------------------------------------------------- /debian/patches/20_remove_privacy_breach.patch: -------------------------------------------------------------------------------- 1 | Description: Rremove proviacy bridge 2 | Author: Anton Gladky 3 | Last-Update: 2022-12-09 4 | 5 | Index: boost/tools/quickbook/doc/block.qbk 6 | =================================================================== 7 | --- boost.orig/tools/quickbook/doc/block.qbk 8 | +++ boost/tools/quickbook/doc/block.qbk 9 | @@ -557,14 +557,12 @@ character or the underscore. The replace 10 | marked up). Example: 11 | 12 | ``` 13 | -[def sf_logo [$http://sourceforge.net/sflogo.php?group_id=28447&type=1]] 14 | +[def sf_logo []] 15 | sf_logo 16 | ``` 17 | 18 | Now everywhere the sf_logo is placed, the picture will be inlined. 19 | 20 | -[def sf_logo [$http://sourceforge.net/sflogo.php?group_id=28447&type=1]] 21 | -sf_logo 22 | 23 | [tip It's a good idea to use macro identifiers that are distinguishable. 24 | For instance, in this document, macro identifiers have two leading and 25 | Index: boost/tools/quickbook/test/quickbook_manual-1_4.gold 26 | =================================================================== 27 | --- boost.orig/tools/quickbook/test/quickbook_manual-1_4.gold 28 | +++ boost/tools/quickbook/test/quickbook_manual-1_4.gold 29 | @@ -1756,14 +1756,10 @@ escape (no processing/formatting) 30 | character or the underscore. The replacement text can be any phrase (even 31 | marked up). Example: 32 | 33 | -[def sf_logo [$http://sourceforge.net/sflogo.php?group_id=28447&type=1]] 34 | -sf_logo 35 | - 36 | 37 | Now everywhere the sf_logo is placed, the picture will be inlined. 38 | 39 | 40 | - 41 | 42 | sflogo 43 | 44 | Index: boost/tools/quickbook/test/quickbook_manual-1_4.gold-html 45 | =================================================================== 46 | --- boost.orig/tools/quickbook/test/quickbook_manual-1_4.gold-html 47 | +++ boost/tools/quickbook/test/quickbook_manual-1_4.gold-html 48 | @@ -1934,16 +1934,9 @@ escape (no processing/formatting) 49 | an alphabetic character or the underscore. The replacement text can 50 | be any phrase (even marked up). Example: 51 |

52 | -
[def sf_logo [$http://sourceforge.net/sflogo.php?group_id=28447&type=1]]
 53 | -sf_logo
 54 | -
55 |

56 | Now everywhere the sf_logo is placed, the picture will be inlined. 57 |

58 | -

59 | - [] 61 | -

62 |
63 |

64 | It's a good idea to use macro identifiers that are distinguishable. 65 | @@ -3280,7 +3273,6 @@ boostbook standalone 66 | : 67 | my_doc 68 | : 69 | - <xsl:param>boost.image.src=images/my_project_logo.png 70 | <xsl:param>boost.image.alt="\"My Project\"" 71 | <xsl:param>boost.image.w=100 72 | <xsl:param>boost.image.h=50 73 | Index: boost/tools/quickbook/test/quickbook_manual-1_4.quickbook 74 | =================================================================== 75 | --- boost.orig/tools/quickbook/test/quickbook_manual-1_4.quickbook 76 | +++ boost/tools/quickbook/test/quickbook_manual-1_4.quickbook 77 | @@ -1081,14 +1081,9 @@ white space characters except '\]'. A ma 78 | character or the underscore. The replacement text can be any phrase (even 79 | marked up). Example: 80 | 81 | -[pre''' 82 | -[def sf_logo [$http://sourceforge.net/sflogo.php?group_id=28447&type=1]] 83 | -sf_logo 84 | -'''] 85 | 86 | Now everywhere the sf_logo is placed, the picture will be inlined. 87 | 88 | -[def sf_logo [$http://sourceforge.net/sflogo.php?group_id=28447&type=1]] 89 | sf_logo 90 | 91 | [tip It's a good idea to use macro identifiers that are distinguishable. 92 | @@ -1878,7 +1873,6 @@ boostbook standalone 93 | : 94 | my_doc 95 | : 96 | - boost.image.src=images/my_project_logo.png 97 | boost.image.alt="\\"My Project\\"" 98 | boost.image.w=100 99 | boost.image.h=50 100 | -------------------------------------------------------------------------------- /debian/tests/srcs/random/demo2.cpp: -------------------------------------------------------------------------------- 1 | // boost1.67-1.67.0/libs/random/example/random_demo.cpp 2 | 3 | /* boost random_demo.cpp profane demo 4 | * 5 | * Copyright Jens Maurer 2000 6 | * Distributed under the Boost Software License, Version 1.0. (See 7 | * accompanying file LICENSE_1_0.txt or copy at 8 | * http://www.boost.org/LICENSE_1_0.txt) 9 | * 10 | * $Id$ 11 | * 12 | * A short demo program how to use the random number library. 13 | */ 14 | 15 | #include 16 | #include 17 | #include // std::time 18 | 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | 25 | // This is a typedef for a random number generator. 26 | // Try boost::mt19937 or boost::ecuyer1988 instead of boost::minstd_rand 27 | typedef boost::minstd_rand base_generator_type; 28 | 29 | // This is a reproducible simulation experiment. See main(). 30 | void experiment(base_generator_type & generator) 31 | { 32 | // Define a uniform random number distribution of integer values between 33 | // 1 and 6 inclusive. 34 | typedef boost::uniform_int<> distribution_type; 35 | typedef boost::variate_generator gen_type; 36 | gen_type die_gen(generator, distribution_type(1, 6)); 37 | 38 | // If you want to use an STL iterator interface, use iterator_adaptors.hpp. 39 | boost::generator_iterator die(&die_gen); 40 | for(int i = 0; i < 10; i++) 41 | std::cout << *die++ << " "; 42 | std::cout << '\n'; 43 | } 44 | 45 | int main() 46 | { 47 | // Define a random number generator and initialize it with a reproducible 48 | // seed. 49 | base_generator_type generator(42); 50 | 51 | std::cout << "10 samples of a uniform distribution in [0..1):\n"; 52 | 53 | // Define a uniform random number distribution which produces "double" 54 | // values between 0 and 1 (0 inclusive, 1 exclusive). 55 | boost::uniform_real<> uni_dist(0,1); 56 | boost::variate_generator > uni(generator, uni_dist); 57 | 58 | std::cout.setf(std::ios::fixed); 59 | // You can now retrieve random numbers from that distribution by means 60 | // of a STL Generator interface, i.e. calling the generator as a zero- 61 | // argument function. 62 | for(int i = 0; i < 10; i++) 63 | std::cout << uni() << '\n'; 64 | 65 | /* 66 | * Change seed to something else. 67 | * 68 | * Caveat: std::time(0) is not a very good truly-random seed. When 69 | * called in rapid succession, it could return the same values, and 70 | * thus the same random number sequences could ensue. If not the same 71 | * values are returned, the values differ only slightly in the 72 | * lowest bits. A linear congruential generator with a small factor 73 | * wrapped in a uniform_smallint (see experiment) will produce the same 74 | * values for the first few iterations. This is because uniform_smallint 75 | * takes only the highest bits of the generator, and the generator itself 76 | * needs a few iterations to spread the initial entropy from the lowest bits 77 | * to the whole state. 78 | */ 79 | generator.seed(static_cast(std::time(0))); 80 | 81 | std::cout << "\nexperiment: roll a die 10 times:\n"; 82 | 83 | // You can save a generator's state by copy construction. 84 | base_generator_type saved_generator = generator; 85 | 86 | // When calling other functions which take a generator or distribution 87 | // as a parameter, make sure to always call by reference (or pointer). 88 | // Calling by value invokes the copy constructor, which means that the 89 | // sequence of random numbers at the caller is disconnected from the 90 | // sequence at the callee. 91 | experiment(generator); 92 | 93 | std::cout << "redo the experiment to verify it:\n"; 94 | experiment(saved_generator); 95 | 96 | // After that, both generators are equivalent 97 | assert(generator == saved_generator); 98 | 99 | // as a degenerate case, you can set min = max for uniform_int 100 | boost::uniform_int<> degen_dist(4,4); 101 | boost::variate_generator > deg(generator, degen_dist); 102 | std::cout << deg() << " " << deg() << " " << deg() << std::endl; 103 | 104 | { 105 | // You can save the generator state for future use. You can read the 106 | // state back in at any later time using operator>>. 107 | std::ofstream file("rng.saved", std::ofstream::trunc); 108 | file << generator; 109 | } 110 | 111 | return 0; 112 | } 113 | -------------------------------------------------------------------------------- /debian/bcp.1: -------------------------------------------------------------------------------- 1 | .\" ======================================================================= 2 | .\" Copyright 2006 Domenico Andreoli 3 | .\" 4 | .\" Distributed under the Boost Software License, Version 1.0. (See 5 | .\" accompanying file LICENSE_1_0.txt or copy at 6 | .\" http://www.boost.org/LICENSE_1_0.txt) 7 | .\" ======================================================================= 8 | .TH BCP "1" "March 2006" "Boost C++ Libraries" "Boost C++ Libraries Documentation" 9 | .SH NAME 10 | bcp \- extract subsets of Boost 11 | .SH SYNOPSIS 12 | .B bcp 13 | \fB\-\-list\fR [\fIoptions\fR] \fImodule\-list\fR 14 | .br 15 | .B bcp 16 | [\fIoptions\fR] \fImodule\-list output\-path\fR 17 | .br 18 | .B bcp 19 | \fB\-\-report\fR [\fIoptions\fR] \fImodule\-list html\-file\fR 20 | .br 21 | .B bcp 22 | \fB\-\-help\fR 23 | .SH DESCRIPTION 24 | Copies all the files, including dependencies, found in \fImodule-list\fR 25 | to \fIoutput-path\fR. \fIoutput-path\fR must be an existing path. 26 | .PP 27 | With \fB\-\-list\fR, prints the list of all the 28 | files in \fImodule-list\fR, including dependencies. 29 | .PP 30 | With \fB\-\-report\fR, writes the HTML report to \fIhtml-file\fR. 31 | .PP 32 | With \fB\-\-help\fR, prints a quick usage reminder. 33 | .PP 34 | It is useful for Boost authors who want to distribute their library 35 | separately from Boost and for Boost users who want to distribute a 36 | subset of Boost with their application. 37 | .SS \fImodule-list\fR 38 | .PP 39 | When the --scan option is not used, a list of Boost files or library names to copy. It can be: 40 | .IP 41 | \- The name of a tool: for example "build" will find "tools/build". 42 | .IP 43 | \- The name of a library: for example "regex". 44 | .IP 45 | \- The title of a header: for example "scoped_ptr" will find "boost/scoped_ptr.hpp". 46 | .IP 47 | \- The name of a header: for example "scoped_ptr.hpp" will find "boost/scoped_ptr.hpp". 48 | .IP 49 | \- The name of a file: for example "boost/regex.hpp". 50 | .PP 51 | When the --scan option is used, a list of (probably non-boost) files to scan for Boost dependencies, the files in the module list are not therefore copied/listed. 52 | .SS File dependencies 53 | C++ source files are scanned for #includes, all #includes present in the 54 | Boost source tree will then be scanned for their dependencies and so on. 55 | .PP 56 | C++ source files are associated with the name of a library, if that 57 | library has source code (and possibly build data), then include that 58 | source in the dependencies. 59 | .PP 60 | C++ source files are checked for dependencies on Boost.Test (for example 61 | to see if they use cpp_main as an entry point). 62 | .PP 63 | HTML files are scanned for immediate dependencies (images and style 64 | sheets, but not links). 65 | .SS 66 | HTML report contains: 67 | .PP 68 | \- all the licenses in effect, plus the files using each license, and 69 | the copyright holders using each license 70 | .PP 71 | \- any files with no recognizable license (please report these to the 72 | Boost mailing lists) 73 | .PP 74 | \- any files with no recognizable copyright holders (please report these 75 | to the Boost mailing lists) 76 | .PP 77 | \- all the copyright holders and the files on which they hold copyright 78 | .PP 79 | \- file dependency information - indicates the reason for the inclusion 80 | of any particular file in the dependencies found 81 | .SH OPTIONS 82 | .TP 83 | \fB\-\-boost\fR=\fIpath\fR 84 | sets the location of the Boost tree to path 85 | .TP 86 | \fB\-\-scan\fR 87 | treat the module list as a list of (possibly non\-boost) 88 | files to scan for Boost dependencies 89 | .TP 90 | \fB\-\-cvs\fR 91 | only copy files under CVS version control 92 | .TP 93 | \fB\-\-unix\-lines\fR 94 | make sure that all copied files use Unix style line endings 95 | .SH EXAMPLES 96 | .TP 97 | \fBbcp\fR scoped_ptr /foo 98 | Copies boost/scoped_ptr.hpp and dependencies to /foo. 99 | .TP 100 | \fBbcp\fR boost/regex.hpp /foo 101 | Copies boost/regex.hpp and all dependencies including the regex source 102 | code (in libs/regex/src) and build files (in libs/regex/build) to /foo. 103 | Does not copy the regex documentation, test or example code. 104 | .TP 105 | \fBbcp\fR regex /foo 106 | Copies the full regex lib (in libs/regex) including dependencies (such 107 | as the Boost.Test source required by the regex test programs) to /foo. 108 | .TP 109 | \fBbcp\fR regex config build /foo 110 | Copies the full regex lib (in libs/regex) plus the config lib 111 | (libs/config) and the build system (tools/build) to /foo including all 112 | the dependencies. 113 | .TP 114 | \fBbcp \-\-scan \-\-boost\fR=/boost foo.cpp bar.cpp boost 115 | Scans the [non-boost] files foo.cpp and bar.cpp for Boost dependencies 116 | and copies those dependencies to the sub-directory boost. 117 | .TP 118 | \fBbcp \-\-report\fR regex.hpp boost-regex-report.html 119 | Creates a HTML report called boost-regex-report.html for the Boost 120 | module regex.hpp. 121 | .SH AUTHORS 122 | Author of bcp is John Maddock. 123 | .PP 124 | Author of this manpage is Domenico Andreoli, who copied stuff from bcp 125 | --help and the HTML documentation. 126 | -------------------------------------------------------------------------------- /debian/tests/srcs/serialization/demo2.cpp: -------------------------------------------------------------------------------- 1 | // boost1.67-1.67.0/libs/regex/example/snippet/demo_shared_ptr.cpp 2 | 3 | // demo_shared_ptr.cpp : demonstrates adding serialization to a template 4 | 5 | // (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . Polymorphic 6 | // derived pointer example by David Tonge. 7 | 8 | // Use, modification and distribution is subject to the Boost Software 9 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 10 | // http://www.boost.org/LICENSE_1_0.txt) 11 | // 12 | // See http://www.boost.org for updates, documentation, and revision history. 13 | 14 | #include 15 | #include 16 | #include // NULL 17 | #include 18 | #include 19 | 20 | #include // remove 21 | #include 22 | #if defined(BOOST_NO_STDC_NAMESPACE) 23 | namespace std{ 24 | using ::remove; 25 | } 26 | #endif 27 | 28 | #include 29 | #include 30 | #include 31 | 32 | #include 33 | 34 | /////////////////////////// 35 | // test shared_ptr serialization 36 | class A 37 | { 38 | private: 39 | friend class boost::serialization::access; 40 | int x; 41 | template 42 | void serialize(Archive & ar, const unsigned int /* file_version */){ 43 | ar & x; 44 | } 45 | public: 46 | static int count; 47 | A(){++count;} // default constructor 48 | virtual ~A(){--count;} // default destructor 49 | }; 50 | 51 | BOOST_SERIALIZATION_SHARED_PTR(A) 52 | 53 | ///////////////// 54 | // ADDITION BY DT 55 | class B : public A 56 | { 57 | private: 58 | friend class boost::serialization::access; 59 | int x; 60 | template 61 | void serialize(Archive & ar, const unsigned int /* file_version */){ 62 | ar & boost::serialization::base_object(*this); 63 | } 64 | public: 65 | static int count; 66 | B() : A() {}; 67 | virtual ~B() {}; 68 | }; 69 | 70 | BOOST_SERIALIZATION_SHARED_PTR(B) 71 | 72 | ///////////////// 73 | 74 | int A::count = 0; 75 | 76 | void display(boost::shared_ptr &spa, boost::shared_ptr &spa1) 77 | { 78 | std::cout << "a = 0x" << std::hex << spa.get() << " "; 79 | if (spa.get()) std::cout << "is a " << typeid(*(spa.get())).name() << "* "; 80 | std::cout << "use count = " << std::dec << spa.use_count() << std::endl; 81 | std::cout << "a1 = 0x" << std::hex << spa1.get() << " "; 82 | if (spa1.get()) std::cout << "is a " << typeid(*(spa1.get())).name() << "* "; 83 | std::cout << "use count = " << std::dec << spa1.use_count() << std::endl; 84 | std::cout << "unique element count = " << A::count << std::endl; 85 | } 86 | 87 | int main(int /* argc */, char * /*argv*/[]) 88 | { 89 | std::string filename(boost::archive::tmpdir()); 90 | filename += "/testfile"; 91 | 92 | // create a new shared pointer to ta new object of type A 93 | boost::shared_ptr spa(new A); 94 | boost::shared_ptr spa1; 95 | spa1 = spa; 96 | display(spa, spa1); 97 | // serialize it 98 | { 99 | std::ofstream ofs(filename.c_str()); 100 | boost::archive::text_oarchive oa(ofs); 101 | oa << spa; 102 | oa << spa1; 103 | } 104 | // reset the shared pointer to NULL 105 | // thereby destroying the object of type A 106 | spa.reset(); 107 | spa1.reset(); 108 | display(spa, spa1); 109 | // restore state to one equivalent to the original 110 | // creating a new type A object 111 | { 112 | // open the archive 113 | std::ifstream ifs(filename.c_str()); 114 | boost::archive::text_iarchive ia(ifs); 115 | 116 | // restore the schedule from the archive 117 | ia >> spa; 118 | ia >> spa1; 119 | } 120 | display(spa, spa1); 121 | spa.reset(); 122 | spa1.reset(); 123 | 124 | std::cout << std::endl; 125 | std::cout << std::endl; 126 | std::cout << "New tests" << std::endl; 127 | 128 | ///////////////// 129 | // ADDITION BY DT 130 | // create a new shared pointer to ta new object of type A 131 | spa = boost::shared_ptr(new B); 132 | spa1 = spa; 133 | display(spa, spa1); 134 | // serialize it 135 | { 136 | std::ofstream ofs(filename.c_str()); 137 | boost::archive::text_oarchive oa(ofs); 138 | oa.register_type(static_cast(NULL)); 139 | oa << spa; 140 | oa << spa1; 141 | } 142 | // reset the shared pointer to NULL 143 | // thereby destroying the object of type B 144 | spa.reset(); 145 | spa1.reset(); 146 | display(spa, spa1); 147 | // restore state to one equivalent to the original 148 | // creating a new type B object 149 | { 150 | // open the archive 151 | std::ifstream ifs(filename.c_str()); 152 | boost::archive::text_iarchive ia(ifs); 153 | 154 | // restore the schedule from the archive 155 | ia.register_type(static_cast(NULL)); 156 | ia >> spa; 157 | ia >> spa1; 158 | } 159 | display(spa, spa1); 160 | /////////////// 161 | std::remove(filename.c_str()); 162 | 163 | // obj of type A gets destroyed 164 | // as smart_ptr goes out of scope 165 | return 0; 166 | } 167 | -------------------------------------------------------------------------------- /debian/tests/srcs/wave/demo1.cpp: -------------------------------------------------------------------------------- 1 | // boost1.67-1.67.0/libs/wave/samples/advanced_hooks 2 | 3 | /*============================================================================= 4 | Boost.Wave: A Standard compliant C++ preprocessor library 5 | Sample demonstrating the usage of advanced preprocessor hooks. 6 | 7 | http://www.boost.org/ 8 | 9 | Copyright (c) 2001-2010 Hartmut Kaiser. Distributed under the Boost 10 | Software License, Version 1.0. (See accompanying file 11 | LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 12 | =============================================================================*/ 13 | 14 | #include 15 | #include 16 | #include 17 | #include 18 | 19 | /////////////////////////////////////////////////////////////////////////////// 20 | // Include Wave itself 21 | #include 22 | 23 | /////////////////////////////////////////////////////////////////////////////// 24 | // Include the lexer stuff 25 | #include // token class 26 | #include // lexer class 27 | 28 | #include "advanced_hooks.hpp" 29 | 30 | /////////////////////////////////////////////////////////////////////////////// 31 | // Main entry point 32 | // 33 | // This sample shows how to use the advanced hooks to output not only the 34 | // preprocessed tokens but also the conditional directives found in the input 35 | // file (these are commented out, tough) and the tokens from inside the 36 | // conditional block which were not evaluated because the corresponding 37 | // condition was false. These tokens are commented out as well. 38 | // 39 | int main(int argc, char *argv[]) 40 | { 41 | if (2 != argc) { 42 | std::cerr << "Usage: advanced_hooks infile" << std::endl; 43 | return -1; 44 | } 45 | 46 | // current file position is saved for exception handling 47 | boost::wave::util::file_position_type current_position; 48 | 49 | try { 50 | // Open and read in the specified input file. 51 | std::ifstream instream(argv[1]); 52 | std::string instring; 53 | 54 | if (!instream.is_open()) { 55 | std::cerr << "Could not open input file: " << argv[1] << std::endl; 56 | return -2; 57 | } 58 | instream.unsetf(std::ios::skipws); 59 | instring = std::string(std::istreambuf_iterator(instream.rdbuf()), 60 | std::istreambuf_iterator()); 61 | 62 | // The template boost::wave::cpplexer::lex_token<> is the token type to be 63 | // used by the Wave library. 64 | typedef boost::wave::cpplexer::lex_token<> token_type; 65 | 66 | // The template boost::wave::cpplexer::lex_iterator<> is the lexer type to 67 | // be used by the Wave library. 68 | typedef boost::wave::cpplexer::lex_iterator lex_iterator_type; 69 | 70 | // This is the resulting context type to use. The first template parameter 71 | // should match the iterator type to be used during construction of the 72 | // corresponding context object (see below). 73 | typedef boost::wave::context context_type; 77 | 78 | // The preprocessor iterator shouldn't be constructed directly. It is 79 | // to be generated through a wave::context<> object. This wave:context<> 80 | // object additionally may be used to initialize and define different 81 | // parameters of the actual preprocessing (not done here). 82 | // 83 | // The preprocessing of the input stream is done on the fly behind the 84 | // scenes during iteration over the context_type::iterator_type stream. 85 | context_type ctx (instring.begin(), instring.end(), argv[1]); 86 | 87 | ctx.set_language(boost::wave::enable_long_long(ctx.get_language())); 88 | ctx.set_language(boost::wave::enable_preserve_comments(ctx.get_language())); 89 | ctx.set_language(boost::wave::enable_prefer_pp_numbers(ctx.get_language())); 90 | 91 | // analyze the input file, print out the preprocessed tokens 92 | context_type::iterator_type first = ctx.begin(); 93 | context_type::iterator_type last = ctx.end(); 94 | 95 | while (first != last) { 96 | current_position = (*first).get_position(); 97 | std::cout << (*first).get_value(); 98 | ++first; 99 | } 100 | } 101 | catch (boost::wave::cpp_exception const& e) { 102 | // some preprocessing error 103 | std::cerr 104 | << e.file_name() << "(" << e.line_no() << "): " 105 | << e.description() << std::endl; 106 | return 2; 107 | } 108 | catch (std::exception const& e) { 109 | // use last recognized token to retrieve the error position 110 | std::cerr 111 | << current_position.get_file() 112 | << "(" << current_position.get_line() << "): " 113 | << "exception caught: " << e.what() 114 | << std::endl; 115 | return 3; 116 | } 117 | catch (...) { 118 | // use last recognized token to retrieve the error position 119 | std::cerr 120 | << current_position.get_file() 121 | << "(" << current_position.get_line() << "): " 122 | << "unexpected exception caught." << std::endl; 123 | return 4; 124 | } 125 | return 0; 126 | } 127 | -------------------------------------------------------------------------------- /debian/tests/srcs/regex/demo1.cpp: -------------------------------------------------------------------------------- 1 | // boost1.67-1.67.0/libs/regex/example/snippet/regex_merge_example.cpp 2 | 3 | 4 | /* 5 | * 6 | * Copyright (c) 1998-2002 7 | * John Maddock 8 | * 9 | * Use, modification and distribution are subject to the 10 | * Boost Software License, Version 1.0. (See accompanying file 11 | * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 12 | * 13 | */ 14 | 15 | /* 16 | * LOCATION: see http://www.boost.org for most recent version. 17 | * FILE regex_merge_example.cpp 18 | * VERSION see 19 | * DESCRIPTION: regex_merge example: 20 | * converts a C++ file to syntax highlighted HTML. 21 | */ 22 | 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | 32 | // purpose: 33 | // takes the contents of a file and transform to 34 | // syntax highlighted code in html format 35 | 36 | boost::regex e1, e2; 37 | extern const char* expression_text; 38 | extern const char* format_string; 39 | extern const char* pre_expression; 40 | extern const char* pre_format; 41 | extern const char* header_text; 42 | extern const char* footer_text; 43 | 44 | void load_file(std::string& s, std::istream& is) 45 | { 46 | s.erase(); 47 | if(is.bad()) return; 48 | s.reserve(static_cast(is.rdbuf()->in_avail())); 49 | char c; 50 | while(is.get(c)) 51 | { 52 | if(s.capacity() == s.size()) 53 | s.reserve(s.capacity() * 3); 54 | s.append(1, c); 55 | } 56 | } 57 | 58 | int main(int argc, const char** argv) 59 | { 60 | try{ 61 | e1.assign(expression_text); 62 | e2.assign(pre_expression); 63 | for(int i = 1; i < argc; ++i) 64 | { 65 | std::cout << "Processing file " << argv[i] << std::endl; 66 | std::ifstream fs(argv[i]); 67 | std::string in; 68 | load_file(in, fs); 69 | fs.close(); 70 | std::string out_name = std::string(argv[i]) + std::string(".htm"); 71 | std::ofstream os(out_name.c_str()); 72 | os << header_text; 73 | // strip '<' and '>' first by outputting to a 74 | // temporary string stream 75 | std::ostringstream t(std::ios::out | std::ios::binary); 76 | std::ostream_iterator oi(t); 77 | boost::regex_merge(oi, in.begin(), in.end(), e2, pre_format, boost::match_default | boost::format_all); 78 | // then output to final output stream 79 | // adding syntax highlighting: 80 | std::string s(t.str()); 81 | std::ostream_iterator out(os); 82 | boost::regex_merge(out, s.begin(), s.end(), e1, format_string, boost::match_default | boost::format_all); 83 | os << footer_text; 84 | os.close(); 85 | } 86 | } 87 | catch(...) 88 | { return -1; } 89 | return 0; 90 | } 91 | 92 | const char* pre_expression = "(<)|(>)|\\r"; 93 | const char* pre_format = "(?1<)(?2>)"; 94 | 95 | 96 | const char* expression_text = // preprocessor directives: index 1 97 | "(^[[:blank:]]*#(?:[^\\\\\\n]|\\\\[^\\n[:punct:][:word:]]*[\\n[:punct:][:word:]])*)|" 98 | // comment: index 2 99 | "(//[^\\n]*|/\\*.*?\\*/)|" 100 | // literals: index 3 101 | "\\<([+-]?(?:(?:0x[[:xdigit:]]+)|(?:(?:[[:digit:]]*\\.)?[[:digit:]]+(?:[eE][+-]?[[:digit:]]+)?))u?(?:(?:int(?:8|16|32|64))|L)?)\\>|" 102 | // string literals: index 4 103 | "('(?:[^\\\\']|\\\\.)*'|\"(?:[^\\\\\"]|\\\\.)*\")|" 104 | // keywords: index 5 105 | "\\<(__asm|__cdecl|__declspec|__export|__far16|__fastcall|__fortran|__import" 106 | "|__pascal|__rtti|__stdcall|_asm|_cdecl|__except|_export|_far16|_fastcall" 107 | "|__finally|_fortran|_import|_pascal|_stdcall|__thread|__try|asm|auto|bool" 108 | "|break|case|catch|cdecl|char|class|const|const_cast|continue|default|delete" 109 | "|do|double|dynamic_cast|else|enum|explicit|extern|false|float|for|friend|goto" 110 | "|if|inline|int|long|mutable|namespace|new|operator|pascal|private|protected" 111 | "|public|register|reinterpret_cast|return|short|signed|sizeof|static|static_cast" 112 | "|struct|switch|template|this|throw|true|try|typedef|typeid|typename|union|unsigned" 113 | "|using|virtual|void|volatile|wchar_t|while)\\>" 114 | ; 115 | 116 | const char* format_string = "(?1$&)" 117 | "(?2$&)" 118 | "(?3$&)" 119 | "(?4$&)" 120 | "(?5$&)"; 121 | 122 | const char* header_text = "\n\n" 123 | "Auto-generated html formated source\n" 124 | "\n" 125 | "\n" 126 | "\n" 127 | "

\n
";
128 | 
129 | const char* footer_text = "
\n\n\n"; 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | -------------------------------------------------------------------------------- /debian/tests/srcs/regex/demo2.cpp: -------------------------------------------------------------------------------- 1 | // boost1.67-1.67.0/libs/regex/example/snippet/regex_replace_example.cpp 2 | 3 | /* 4 | * 5 | * Copyright (c) 1998-2002 6 | * John Maddock 7 | * 8 | * Use, modification and distribution are subject to the 9 | * Boost Software License, Version 1.0. (See accompanying file 10 | * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 11 | * 12 | */ 13 | 14 | /* 15 | * LOCATION: see http://www.boost.org for most recent version. 16 | * FILE regex_replace_example.cpp 17 | * VERSION see 18 | * DESCRIPTION: regex_replace example: 19 | * converts a C++ file to syntax highlighted HTML. 20 | */ 21 | 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | 31 | // purpose: 32 | // takes the contents of a file and transform to 33 | // syntax highlighted code in html format 34 | 35 | boost::regex e1, e2; 36 | extern const char* expression_text; 37 | extern const char* format_string; 38 | extern const char* pre_expression; 39 | extern const char* pre_format; 40 | extern const char* header_text; 41 | extern const char* footer_text; 42 | 43 | void load_file(std::string& s, std::istream& is) 44 | { 45 | s.erase(); 46 | if(is.bad()) return; 47 | s.reserve(static_cast(is.rdbuf()->in_avail())); 48 | char c; 49 | while(is.get(c)) 50 | { 51 | if(s.capacity() == s.size()) 52 | s.reserve(s.capacity() * 3); 53 | s.append(1, c); 54 | } 55 | } 56 | 57 | int main(int argc, const char** argv) 58 | { 59 | try{ 60 | e1.assign(expression_text); 61 | e2.assign(pre_expression); 62 | for(int i = 1; i < argc; ++i) 63 | { 64 | std::cout << "Processing file " << argv[i] << std::endl; 65 | std::ifstream fs(argv[i]); 66 | std::string in; 67 | load_file(in, fs); 68 | fs.close(); 69 | std::string out_name = std::string(argv[i]) + std::string(".htm"); 70 | std::ofstream os(out_name.c_str()); 71 | os << header_text; 72 | // strip '<' and '>' first by outputting to a 73 | // temporary string stream 74 | std::ostringstream t(std::ios::out | std::ios::binary); 75 | std::ostream_iterator oi(t); 76 | boost::regex_replace(oi, in.begin(), in.end(), e2, pre_format, boost::match_default | boost::format_all); 77 | // then output to final output stream 78 | // adding syntax highlighting: 79 | std::string s(t.str()); 80 | std::ostream_iterator out(os); 81 | boost::regex_replace(out, s.begin(), s.end(), e1, format_string, boost::match_default | boost::format_all); 82 | os << footer_text; 83 | os.close(); 84 | } 85 | } 86 | catch(...) 87 | { return -1; } 88 | return 0; 89 | } 90 | 91 | const char* pre_expression = "(<)|(>)|(&)|\\r"; 92 | const char* pre_format = "(?1<)(?2>)(?3&)"; 93 | 94 | 95 | const char* expression_text = // preprocessor directives: index 1 96 | "(^[[:blank:]]*#(?:[^\\\\\\n]|\\\\[^\\n[:punct:][:word:]]*[\\n[:punct:][:word:]])*)|" 97 | // comment: index 2 98 | "(//[^\\n]*|/\\*.*?\\*/)|" 99 | // literals: index 3 100 | "\\<([+-]?(?:(?:0x[[:xdigit:]]+)|(?:(?:[[:digit:]]*\\.)?[[:digit:]]+(?:[eE][+-]?[[:digit:]]+)?))u?(?:(?:int(?:8|16|32|64))|L)?)\\>|" 101 | // string literals: index 4 102 | "('(?:[^\\\\']|\\\\.)*'|\"(?:[^\\\\\"]|\\\\.)*\")|" 103 | // keywords: index 5 104 | "\\<(__asm|__cdecl|__declspec|__export|__far16|__fastcall|__fortran|__import" 105 | "|__pascal|__rtti|__stdcall|_asm|_cdecl|__except|_export|_far16|_fastcall" 106 | "|__finally|_fortran|_import|_pascal|_stdcall|__thread|__try|asm|auto|bool" 107 | "|break|case|catch|cdecl|char|class|const|const_cast|continue|default|delete" 108 | "|do|double|dynamic_cast|else|enum|explicit|extern|false|float|for|friend|goto" 109 | "|if|inline|int|long|mutable|namespace|new|operator|pascal|private|protected" 110 | "|public|register|reinterpret_cast|return|short|signed|sizeof|static|static_cast" 111 | "|struct|switch|template|this|throw|true|try|typedef|typeid|typename|union|unsigned" 112 | "|using|virtual|void|volatile|wchar_t|while)\\>" 113 | ; 114 | 115 | const char* format_string = "(?1$&)" 116 | "(?2$&)" 117 | "(?3$&)" 118 | "(?4$&)" 119 | "(?5$&)"; 120 | 121 | const char* header_text = "\n\n" 122 | "Auto-generated html formated source\n" 123 | "\n" 124 | "\n" 125 | "\n" 126 | "

\n
";
127 | 
128 | const char* footer_text = "
\n\n\n"; 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | -------------------------------------------------------------------------------- /debian/tests/srcs/wave/demo2.cpp: -------------------------------------------------------------------------------- 1 | /*============================================================================= 2 | Boost.Wave: A Standard compliant C++ preprocessor library 3 | 4 | http://www.boost.org/ 5 | 6 | Copyright (c) 2001-2010 Hartmut Kaiser. Distributed under the Boost 7 | Software License, Version 1.0. (See accompanying file 8 | LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | =============================================================================*/ 10 | 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | 17 | /////////////////////////////////////////////////////////////////////////////// 18 | // Include Wave itself 19 | #include 20 | 21 | /////////////////////////////////////////////////////////////////////////////// 22 | // Include the lexer stuff 23 | #include // token class 24 | #include // lexer class 25 | 26 | /////////////////////////////////////////////////////////////////////////////// 27 | // 28 | // Special output operator for a lex_token. 29 | // 30 | // Note: this doesn't compile if BOOST_SPIRIT_DEBUG is defined. 31 | // 32 | /////////////////////////////////////////////////////////////////////////////// 33 | template 34 | inline std::ostream & 35 | operator<< (std::ostream &stream, 36 | boost::wave::cpplexer::lex_token const &t) 37 | { 38 | using namespace std; 39 | using namespace boost::wave; 40 | 41 | token_id id = token_id(t); 42 | stream << setw(16) 43 | << left << boost::wave::get_token_name(id) << " (" 44 | << "#" << setw(3) << BASEID_FROM_TOKEN(id); 45 | 46 | if (ExtTokenTypeMask & id) { 47 | // this is an extended token id 48 | if (AltTokenType == (id & ExtTokenOnlyMask)) { 49 | stream << ", AltTokenType"; 50 | } 51 | else if (TriGraphTokenType == (id & ExtTokenOnlyMask)) { 52 | stream << ", TriGraphTokenType"; 53 | } 54 | else if (AltExtTokenType == (id & ExtTokenOnlyMask)){ 55 | stream << ", AltExtTokenType"; 56 | } 57 | } 58 | 59 | stream 60 | << ") at " << t.get_position().get_file() << " (" 61 | << setw(3) << right << t.get_position().get_line() << "/" 62 | << setw(2) << right << t.get_position().get_column() 63 | << "): >"; 64 | 65 | typedef typename boost::wave::cpplexer::lex_token::string_type 66 | string_type; 67 | 68 | string_type const& value = t.get_value(); 69 | for (std::size_t i = 0; i < value.size(); ++i) { 70 | switch (value[i]) { 71 | case '\r': stream << "\\r"; break; 72 | case '\n': stream << "\\n"; break; 73 | case '\t': stream << "\\t"; break; 74 | default: 75 | stream << value[i]; 76 | break; 77 | } 78 | } 79 | stream << "<"; 80 | 81 | return stream; 82 | } 83 | 84 | /////////////////////////////////////////////////////////////////////////////// 85 | // main entry point 86 | int main(int argc, char *argv[]) 87 | { 88 | if (2 != argc) { 89 | std::cerr << "Usage: lexed_tokens infile" << std::endl; 90 | return -1; 91 | } 92 | 93 | // current file position is saved for exception handling 94 | boost::wave::util::file_position_type current_position; 95 | 96 | try { 97 | // Open and read in the specified input file. 98 | std::ifstream instream(argv[1]); 99 | std::string instr; 100 | 101 | if (!instream.is_open()) { 102 | std::cerr << "Could not open input file: " << argv[1] << std::endl; 103 | return -2; 104 | } 105 | instream.unsetf(std::ios::skipws); 106 | instr = std::string(std::istreambuf_iterator(instream.rdbuf()), 107 | std::istreambuf_iterator()); 108 | 109 | // tokenize the input data into C++ tokens using the C++ lexer 110 | typedef boost::wave::cpplexer::lex_token<> token_type; 111 | typedef boost::wave::cpplexer::lex_iterator lexer_type; 112 | typedef token_type::position_type position_type; 113 | 114 | position_type pos(argv[1]); 115 | lexer_type it = lexer_type(instr.begin(), instr.end(), pos, 116 | boost::wave::language_support( 117 | boost::wave::support_cpp|boost::wave::support_option_long_long)); 118 | lexer_type end = lexer_type(); 119 | 120 | while (it != end) { 121 | current_position = (*it).get_position(); // for error reporting 122 | std::cout << *it << std::endl; // dump the tokenf info 123 | ++it; 124 | } 125 | } 126 | catch (boost::wave::cpplexer::lexing_exception const& e) { 127 | // some lexing error 128 | std::cerr 129 | << e.file_name() << "(" << e.line_no() << "): " 130 | << e.description() << std::endl; 131 | return 2; 132 | } 133 | catch (std::exception const& e) { 134 | // use last recognized token to retrieve the error position 135 | std::cerr 136 | << current_position.get_file() 137 | << "(" << current_position.get_line() << "): " 138 | << "exception caught: " << e.what() 139 | << std::endl; 140 | return 3; 141 | } 142 | catch (...) { 143 | // use last recognized token to retrieve the error position 144 | std::cerr 145 | << current_position.get_file() 146 | << "(" << current_position.get_line() << "): " 147 | << "unexpected exception caught." << std::endl; 148 | return 4; 149 | } 150 | return 0; 151 | } 152 | -------------------------------------------------------------------------------- /debian/tests/srcs/iostreams/container_device.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) 2 | // (C) Copyright 2005-2007 Jonathan Turkanis 3 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 4 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) 5 | 6 | // See http://www.boost.org/libs/iostreams for documentation. 7 | 8 | #ifndef BOOST_IOSTREAMS_EXAMPLE_CONTAINTER_DEVICE_HPP_INCLUDED 9 | #define BOOST_IOSTREAMS_EXAMPLE_CONTAINTER_DEVICE_HPP_INCLUDED 10 | 11 | #include // copy, min. 12 | #include 13 | #include // BOOST_NO_STDC_NAMESPACE. 14 | #include 15 | #include // failure. 16 | 17 | // Must come last. 18 | #include 19 | 20 | namespace boost { namespace iostreams { namespace example { 21 | 22 | // 23 | // Model of Source which reads from an STL-compatible sequence 24 | // whose iterators are random-access iterators. 25 | // 26 | template 27 | class container_source { 28 | public: 29 | typedef typename Container::value_type char_type; 30 | typedef source_tag category; 31 | container_source(Container& container) 32 | : container_(container), pos_(0) 33 | { } 34 | std::streamsize read(char_type* s, std::streamsize n) 35 | { 36 | using namespace std; 37 | std::streamsize amt = 38 | static_cast(container_.size() - pos_); 39 | std::streamsize result = (min)(n, amt); 40 | if (result != 0) { 41 | std::copy( container_.begin() + pos_, 42 | container_.begin() + pos_ + result, 43 | s ); 44 | pos_ += result; 45 | return result; 46 | } else { 47 | return -1; // EOF 48 | } 49 | } 50 | Container& container() { return container_; } 51 | private: 52 | container_source operator=(const container_source&); 53 | typedef typename Container::size_type size_type; 54 | Container& container_; 55 | size_type pos_; 56 | }; 57 | 58 | // 59 | // Model of Sink which appends to an STL-compatible sequence. 60 | // 61 | template 62 | class container_sink { 63 | public: 64 | typedef typename Container::value_type char_type; 65 | typedef sink_tag category; 66 | container_sink(Container& container) : container_(container) { } 67 | std::streamsize write(const char_type* s, std::streamsize n) 68 | { 69 | container_.insert(container_.end(), s, s + n); 70 | return n; 71 | } 72 | Container& container() { return container_; } 73 | private: 74 | container_sink operator=(const container_sink&); 75 | Container& container_; 76 | }; 77 | 78 | // 79 | // Model of SeekableDevice which accessS an TL-compatible sequence 80 | // whose iterators are random-access iterators. 81 | // 82 | template 83 | class container_device { 84 | public: 85 | typedef typename Container::value_type char_type; 86 | typedef seekable_device_tag category; 87 | container_device(Container& container) 88 | : container_(container), pos_(0) 89 | { } 90 | 91 | std::streamsize read(char_type* s, std::streamsize n) 92 | { 93 | using namespace std; 94 | std::streamsize amt = 95 | static_cast(container_.size() - pos_); 96 | std::streamsize result = (min)(n, amt); 97 | if (result != 0) { 98 | std::copy( container_.begin() + pos_, 99 | container_.begin() + pos_ + result, 100 | s ); 101 | pos_ += result; 102 | return result; 103 | } else { 104 | return -1; // EOF 105 | } 106 | } 107 | std::streamsize write(const char_type* s, std::streamsize n) 108 | { 109 | using namespace std; 110 | std::streamsize result = 0; 111 | if (pos_ != container_.size()) { 112 | std::streamsize amt = 113 | static_cast(container_.size() - pos_); 114 | result = (min)(n, amt); 115 | std::copy(s, s + result, container_.begin() + pos_); 116 | pos_ += result; 117 | } 118 | if (result < n) { 119 | container_.insert(container_.end(), s, s + n); 120 | pos_ = container_.size(); 121 | } 122 | return n; 123 | } 124 | stream_offset seek(stream_offset off, BOOST_IOS::seekdir way) 125 | { 126 | using namespace std; 127 | 128 | // Determine new value of pos_ 129 | stream_offset next; 130 | if (way == BOOST_IOS::beg) { 131 | next = off; 132 | } else if (way == BOOST_IOS::cur) { 133 | next = pos_ + off; 134 | } else if (way == BOOST_IOS::end) { 135 | next = container_.size() + off - 1; 136 | } else { 137 | throw BOOST_IOSTREAMS_FAILURE("bad seek direction"); 138 | } 139 | 140 | // Check for errors 141 | if (next < 0 || next > static_cast(container_.size())) 142 | throw BOOST_IOSTREAMS_FAILURE("bad seek offset"); 143 | 144 | pos_ = next; 145 | return pos_; 146 | } 147 | 148 | Container& container() { return container_; } 149 | private: 150 | container_device operator=(const container_device&); 151 | typedef typename Container::size_type size_type; 152 | Container& container_; 153 | size_type pos_; 154 | }; 155 | 156 | } } } // End namespaces example, iostreams, boost. 157 | 158 | #include 159 | 160 | #endif // #ifndef BOOST_IOSTREAMS_EXAMPLE_CONTAINTER_DEVICE_HPP_INCLUDED 161 | -------------------------------------------------------------------------------- /debian/README.Debian: -------------------------------------------------------------------------------- 1 | Help Save the World 2 | ------------------- 3 | 4 | Boost is a fairly extensive set of libraries, of which I personally 5 | use but a very small part. I greatly appreciate folks that send 6 | patches to the BTS. Please do have a look at the outstanding bug 7 | reports and send me hints or patches if you have extra information. 8 | 9 | 10 | Getting Started 11 | --------------- 12 | 13 | The following table shows which components use a library (shared or 14 | static) and the corresponding "-l" flag. All libraries are built 15 | for multithreaded applications. 16 | 17 | Component Link Flag Library Type 18 | --------- --------- ------------ 19 | Boost.Atomic -lboost_atomic static shared 20 | Boost.Chrono -lboost_chrono static shared 21 | Boost.Container -lboost_container static shared 22 | Boost.Context -lboost_context static shared 23 | Boost.Coroutine -lboost_coroutine static shared 24 | Boost.Date_Time -lboost_date_time static shared 25 | Boost.Exception -lboost_exception static x 26 | Boost.Fiber -lboost_fiber static shared 27 | Boost.Filesystem -lboost_filesystem static shared 28 | Boost.Graph -lboost_graph static shared 29 | Boost.Graph_parallel -lboost_graph_parallel static shared 30 | Boost.IOStreams -lboost_iostreams static shared 31 | Boost.Locale -lboost_locale static shared 32 | Boost.log -lboost_log static shared 33 | -lboost_log_setup static shared 34 | Boost.Math -lboost_math_c99 static shared 35 | -lboost_math_c99f static shared 36 | -lboost_math_c99l [1] static shared 37 | -lboost_math_tr1 static shared 38 | -lboost_math_tr1f static shared 39 | -lboost_math_tr1l [1] static shared 40 | Boost.MPI -lboost_mpi static shared 41 | Boost.Program_options -lboost_program_options static shared 42 | Boost.Python -lboost_python-pyPQ [2] static shared 43 | -lboost_python [3] static shared 44 | -lboost_mpi_python-pyPQ [2] static shared 45 | -lboost_mpi_python [3] static shared 46 | Boost.Random -lboost_random static shared 47 | Boost.Regex -lboost_regex static shared 48 | Boost.Serialization -lboost_serialization static shared 49 | -lboost_wserialization static shared 50 | Boost.Signals -lboost_signals static shared 51 | Boost.System -lboost_system static shared 52 | Boost.Test -lboost_prg_exec_monitor static shared 53 | -lboost_test_exec_monitor static x 54 | -lboost_unit_test_framework static shared 55 | Boost.Thread -lboost_thread static shared 56 | Boost.Timer -lboost_timer static shared 57 | Boost.TypeErasure -lboost_type_erasure static shared 58 | Boost.Wave -lboost_wave static shared 59 | 60 | 61 | [1] Not available on all architectures. 62 | [2] Boost.Python is built for multiple Python versions. 63 | For example, Boost 1.48.0 is built for Python 2.6, 2.7, and 3.2; 64 | the corresponding libraries are -lboost_python-py26, -py27, and 65 | -py32. 66 | [3] Symbolic link to the default version of Python (as of build time). 67 | 68 | Most of Boost is installed using the package libboostX.Y-dev. 69 | The components with a shared library have separate -dev packages. 70 | 71 | There is extensive documentation available in the libboostX.Y-doc 72 | package and at www.boost.org. 73 | 74 | 75 | Debian Packaging of Boost 76 | ------------------------- 77 | 78 | Upstream releases quarterly without guaranteeing any backwards 79 | compatibility. Debian chooses to package two versions of Boost 80 | simultaneously, to enable users to make the transition on their own 81 | time. The -dev packages are decorated with the Boost version, 82 | e.g. libboost1.39-dev and libboost1.40-dev. If your code builds only 83 | with a specific version of boost, you can directly install that 84 | specific version. 85 | 86 | On the other hand, many of the mature Boost libraries hardly change 87 | from one version to the next. If your code uses only such stable 88 | libraries, then continually installing versioned -dev packages is a 89 | nuisance. Debian therefore has a set of "default" Boost development 90 | packages without a version number; e.g. libboost-dev. These packages 91 | will pull in the version of boost considered most suitable at any 92 | given time. If your code is not tied to a specific Boost version, you 93 | can use the unversioned development packages. 94 | 95 | This strategy was hashed out on debian-release in the Spring of 2009. 96 | See threads starting at: 97 | http://lists.debian.org/debian-release/2009/03/msg00147.html 98 | http://lists.debian.org/debian-release/2009/04/msg00251.html 99 | http://lists.debian.org/debian-release/2009/05/msg00011.html 100 | 101 | 102 | Example Code 103 | ------------ 104 | 105 | All example code is shipped in libboostX.Y-doc package. 106 | 107 | Some of the example code is linked to by the documentation, and thus 108 | appears in a directory named 109 | 110 | /usr/share/doc/libboostX.Y-doc/HTML/libs/*/example 111 | 112 | Example code that is not linked from the documentation appears in a 113 | directory under 114 | 115 | /usr/share/doc/libboostX.Y-doc/examples/libs/ 116 | 117 | 118 | Use of boost/nondet_random.hpp 119 | ------------------------------ 120 | 121 | The use of this header file is subject to the availability of class 122 | boost::random_device::impl. Boost libraries provide only an example 123 | implementation which the user may use to fit her needs. 124 | 125 | Such implementation is distributed by libboostX.Y-dev Debian package 126 | in file /usr/share/doc/libboostX.Y-dev/examples/random_device.cpp. 127 | This file is generally good enough for most linux users. Simply 128 | copy and modify to suit your needs. 129 | 130 | 131 | Boost.Test main() function 132 | -------------------------- 133 | 134 | The Boost unit test framework defines a main() function in the static 135 | library boost_unit_test_framework.a. Prior to v 1.34, the shared 136 | library also defined main() but it no longer does. 137 | 138 | Please see the manual and the following thread for more details 139 | http://lists.boost.org/boost-users/2008/03/34486.php 140 | 141 | 142 | -- Steve M. Robbins , Sat, 15 Oct 2016 22:38:12 -0500 143 | --------------------------------------------------------------------------------