Compare commits

...

6 Commits

Author SHA1 Message Date
Glen Fernandes
3b40572055 Merge branch 'develop' 2019-12-17 08:42:23 -05:00
Glen Fernandes
eab203a2c5 Update Travis configuration 2019-12-17 08:41:00 -05:00
Glen Fernandes
e6f210c7ca Correct all guard macros to conform to Boost guidelines 2019-12-16 19:27:19 -05:00
Glen Fernandes
74cbc0f659 Merge branch 'develop' 2019-05-03 20:01:49 -04:00
Glen Fernandes
2f03d28dab Update appveyor configuration 2019-05-03 17:38:44 -04:00
Glen Fernandes
5bdb4f852c Use alloc_construct utilities from Boost.Core 2019-05-03 10:24:32 -04:00
21 changed files with 137 additions and 139 deletions

View File

@@ -5,6 +5,8 @@ language: cpp
sudo: false
dist: trusty
python: "2.7"
branches:
@@ -97,7 +99,6 @@ matrix:
- ubuntu-toolchain-r-test
- os: linux
dist: trusty
compiler: g++-7
env: TOOLSET=gcc COMPILER=g++-7 CXXSTD=03,11,14,17
addons:
@@ -109,7 +110,7 @@ matrix:
- os: linux
compiler: g++-8
env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=03,11,14,17
env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=03,11,14,17,2a
addons:
apt:
packages:
@@ -117,10 +118,36 @@ matrix:
sources:
- ubuntu-toolchain-r-test
- os: linux
compiler: g++-9
env: TOOLSET=gcc COMPILER=g++-9 CXXSTD=03,11,14,17,2a
addons:
apt:
packages:
- g++-9
sources:
- ubuntu-toolchain-r-test
- os: linux
compiler: clang++
env: TOOLSET=clang COMPILER=clang++ CXXSTD=03,11
- os: linux
compiler: /usr/bin/clang++
env: TOOLSET=clang COMPILER=/usr/bin/clang++ CXXSTD=03,11
addons:
apt:
packages:
- clang-3.3
- os: linux
compiler: /usr/bin/clang++
env: TOOLSET=clang COMPILER=/usr/bin/clang++ CXXSTD=03,11
addons:
apt:
packages:
- clang-3.4
- os: linux
compiler: clang++-3.5
env: TOOLSET=clang COMPILER=clang++-3.5 CXXSTD=03,11,14,1z
@@ -131,6 +158,7 @@ matrix:
- libstdc++-4.9-dev
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.5
- os: linux
compiler: clang++-3.6
@@ -139,9 +167,20 @@ matrix:
apt:
packages:
- clang-3.6
- libstdc++-4.9-dev
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.6
- os: linux
compiler: clang++-3.7
env: TOOLSET=clang COMPILER=clang++-3.7 CXXSTD=03,11,14,1z
addons:
apt:
packages:
- clang-3.7
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.7
- os: linux
compiler: clang++-3.8
@@ -153,6 +192,7 @@ matrix:
- libstdc++-4.9-dev
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.8
- os: linux
compiler: clang++-3.9
@@ -164,6 +204,7 @@ matrix:
- libstdc++-4.9-dev
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.9
- os: linux
compiler: clang++-4.0
@@ -189,7 +230,7 @@ matrix:
- os: linux
compiler: clang++-6.0
env: TOOLSET=clang COMPILER=clang++-6.0 CXXSTD=03,11,14,17
env: TOOLSET=clang COMPILER=clang++-6.0 CXXSTD=03,11,14,17,2a
addons:
apt:
packages:
@@ -198,6 +239,28 @@ matrix:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-6.0
- os: linux
compiler: clang++-7
env: TOOLSET=clang COMPILER=clang++-7 CXXSTD=03,11,14,17,2a
addons:
apt:
packages:
- clang-7
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-7
- os: linux
compiler: clang++-8
env: TOOLSET=clang COMPILER=clang++-8 CXXSTD=03,11,14,17,2a
addons:
apt:
packages:
- clang-8
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-8
- os: linux
compiler: clang++-libc++
env: TOOLSET=clang COMPILER=clang++-libc++ CXXSTD=03,11,14,1z

View File

@@ -12,19 +12,27 @@ branches:
environment:
matrix:
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
TOOLSET: msvc-9.0
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
TOOLSET: msvc-10.0
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
TOOLSET: msvc-11.0
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
TOOLSET: msvc-12.0
ADDRMD: 32,64
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
TOOLSET: msvc-14.0
ADDRMD: 32,64
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
TOOLSET: msvc-14.1
CXXSTD: 14,17
ADDRMD: 32,64
STANDARD: 14,17
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
TOOLSET: clang-win
ADDRMD: 32,64
STANDARD: 14,17
install:
- set BOOST_BRANCH=develop

View File

@@ -13,8 +13,8 @@
// Andrew Lumsdaine
// See http://www.boost.org/libs/multi_array for documentation.
#ifndef BOOST_MULTI_ARRAY_RG071801_HPP
#define BOOST_MULTI_ARRAY_RG071801_HPP
#ifndef BOOST_MULTI_ARRAY_HPP
#define BOOST_MULTI_ARRAY_HPP
//
// multi_array.hpp - contains the multi_array class template
@@ -33,7 +33,7 @@
#include "boost/multi_array/subarray.hpp"
#include "boost/multi_array/multi_array_ref.hpp"
#include "boost/multi_array/algorithm.hpp"
#include "boost/multi_array/allocators.hpp"
#include "boost/core/alloc_construct.hpp"
#include "boost/core/empty_value.hpp"
#include "boost/array.hpp"
#include "boost/mpl/if.hpp"
@@ -545,12 +545,12 @@ private:
base_ = allocator().allocate(this->num_elements());
this->set_base_ptr(base_);
allocated_elements_ = this->num_elements();
detail::multi_array::construct(allocator(),base_,base_+allocated_elements_);
boost::alloc_construct_n(allocator(),base_,allocated_elements_);
}
void deallocate_space() {
if(base_) {
detail::multi_array::destroy(allocator(),base_,base_+allocated_elements_);
boost::alloc_destroy_n(allocator(),base_,allocated_elements_);
allocator().deallocate(base_,allocated_elements_);
}
}
@@ -569,4 +569,4 @@ private:
# pragma GCC diagnostic pop
#endif
#endif // BOOST_MULTI_ARRAY_RG071801_HPP
#endif

View File

@@ -1,5 +1,5 @@
#ifndef BOOST_ALGORITHM_RG071801_HPP
#define BOOST_ALGORITHM_RG071801_HPP
#ifndef BOOST_MULTI_ARRAY_ALGORITHM_HPP
#define BOOST_MULTI_ARRAY_ALGORITHM_HPP
//
//
@@ -100,4 +100,4 @@ copy_n(InputIter first, Size count, OutputIter result) {
} // namespace detail
} // namespace boost
#endif // BOOST_ALGORITHM_RG071801_HPP
#endif

View File

@@ -1,72 +0,0 @@
// Copyright 2018 Glen Joseph Fernandes
// (glenjofe@gmail.com)
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_MULTI_ARRAY_ALLOCATORS_HPP
#define BOOST_MULTI_ARRAY_ALLOCATORS_HPP
#include <boost/config.hpp>
#if !defined(BOOST_NO_CXX11_ALLOCATOR)
#include <memory>
#else
#include <new>
#endif
namespace boost {
namespace detail {
namespace multi_array {
template<class A, class T>
inline void destroy(A& allocator, T* ptr, T* end)
{
for (; ptr != end; ++ptr) {
#if !defined(BOOST_NO_CXX11_ALLOCATOR)
std::allocator_traits<A>::destroy(allocator,ptr);
#else
ptr->~T();
#endif
}
}
template<class A, class T>
inline void construct(A& allocator, T* ptr)
{
#if !defined(BOOST_NO_CXX11_ALLOCATOR)
std::allocator_traits<A>::construct(allocator,ptr);
#else
::new(static_cast<void*>(ptr)) T();
#endif
}
#if !defined(BOOST_NO_EXCEPTIONS)
template<class A, class T>
inline void construct(A& allocator, T* ptr, T* end)
{
T* start = ptr;
try {
for (; ptr != end; ++ptr) {
boost::detail::multi_array::construct(allocator,ptr);
}
} catch (...) {
boost::detail::multi_array::destroy(allocator,start,ptr);
throw;
}
}
#else
template<class A, class T>
inline void construct(A& allocator, T* ptr, T* end)
{
for (; ptr != end; ++ptr) {
boost::detail::multi_array::construct(allocator,ptr);
}
}
#endif
} // multi_array
} // detail
} // boost
#endif

View File

@@ -10,8 +10,8 @@
// Andrew Lumsdaine
// See http://www.boost.org/libs/multi_array for documentation.
#ifndef BASE_RG071801_HPP
#define BASE_RG071801_HPP
#ifndef BOOST_MULTI_ARRAY_BASE_HPP
#define BOOST_MULTI_ARRAY_BASE_HPP
//
// base.hpp - some implementation base classes for from which
@@ -498,4 +498,4 @@ protected:
} // namespace boost
#endif // BASE_RG071801_HPP
#endif

View File

@@ -10,8 +10,8 @@
// Andrew Lumsdaine
// See http://www.boost.org/libs/multi_array for documentation.
#ifndef COLLECTION_CONCEPT_RG103101_HPP
#define COLLECTION_CONCEPT_RG103101_HPP
#ifndef BOOST_MULTI_ARRAY_COLLECTION_CONCEPT_HPP
#define BOOST_MULTI_ARRAY_COLLECTION_CONCEPT_HPP
#include "boost/concept_check.hpp"
@@ -23,4 +23,4 @@ namespace multi_array { // Old location for this
}
}
#endif // COLLECTION_CONCEPT_RG103101_HPP
#endif

View File

@@ -10,8 +10,8 @@
// Andrew Lumsdaine
// See http://www.boost.org/libs/multi_array for documentation.
#ifndef BOOST_MULTI_ARRAY_CONCEPT_CHECKS_RG110101_HPP
#define BOOST_MULTI_ARRAY_CONCEPT_CHECKS_RG110101_HPP
#ifndef BOOST_MULTI_ARRAY_CONCEPT_CHECKS_HPP
#define BOOST_MULTI_ARRAY_CONCEPT_CHECKS_HPP
//
// concept-checks.hpp - Checks out Const MultiArray and MultiArray
@@ -218,4 +218,4 @@ namespace detail {
} // namespace boost
#endif // BOOST_MULTI_ARRAY_CONCEPT_CHECKS_RG110101_HPP
#endif

View File

@@ -10,8 +10,8 @@
// Andrew Lumsdaine
// See http://www.boost.org/libs/multi_array for documentation.
#ifndef COPY_ARRAY_RG092101_HPP
#define COPY_ARRAY_RG092101_HPP
#ifndef BOOST_MULTI_ARRAY_COPY_ARRAY_HPP
#define BOOST_MULTI_ARRAY_COPY_ARRAY_HPP
//
// copy_array.hpp - generic code for copying the contents of one
@@ -65,4 +65,4 @@ void copy_array (Array1& source, Array2& dest) {
} // namespace detail
} // namespace boost
#endif // COPY_ARRAY_RG092101_HPP
#endif

View File

@@ -10,8 +10,8 @@
// Andrew Lumsdaine
// See http://www.boost.org/libs/multi_array for documentation.
#ifndef BOOST_EXTENT_GEN_RG071801_HPP
#define BOOST_EXTENT_GEN_RG071801_HPP
#ifndef BOOST_MULTI_ARRAY_EXTENT_GEN_HPP
#define BOOST_MULTI_ARRAY_EXTENT_GEN_HPP
#include "boost/multi_array/extent_range.hpp"
#include "boost/multi_array/range_list.hpp"
@@ -72,4 +72,4 @@ public:
} // namespace boost
#endif // BOOST_EXTENT_GEN_RG071801_HPP
#endif

View File

@@ -10,8 +10,8 @@
// Andrew Lumsdaine
// See http://www.boost.org/libs/multi_array for documentation.
#ifndef BOOST_EXTENT_RANGE_RG071801_HPP
#define BOOST_EXTENT_RANGE_RG071801_HPP
#ifndef BOOST_MULTI_ARRAY_EXTENT_RANGE_HPP
#define BOOST_MULTI_ARRAY_EXTENT_RANGE_HPP
#include <utility>
@@ -46,4 +46,4 @@ public:
} // namespace boost
#endif // BOOST_EXTENT_RANGE_RG071801_HPP
#endif

View File

@@ -10,8 +10,8 @@
// Andrew Lumsdaine
// See http://www.boost.org/libs/multi_array for documentation.
#ifndef BOOST_INDEX_GEN_RG071801_HPP
#define BOOST_INDEX_GEN_RG071801_HPP
#ifndef BOOST_MULTI_ARRAY_INDEX_GEN_HPP
#define BOOST_MULTI_ARRAY_INDEX_GEN_HPP
#include "boost/array.hpp"
#include "boost/multi_array/index_range.hpp"
@@ -78,4 +78,4 @@ public:
} // namespace boost
#endif // BOOST_INDEX_GEN_RG071801_HPP
#endif

View File

@@ -10,8 +10,8 @@
// Andrew Lumsdaine
// See http://www.boost.org/libs/multi_array for documentation.
#ifndef BOOST_INDEX_RANGE_RG071801_HPP
#define BOOST_INDEX_RANGE_RG071801_HPP
#ifndef BOOST_MULTI_ARRAY_INDEX_RANGE_HPP
#define BOOST_MULTI_ARRAY_INDEX_RANGE_HPP
#include <boost/config.hpp>
#include <utility>
@@ -191,4 +191,4 @@ namespace multi_array {
} // namespace detail
} // namespace boost
#endif // BOOST_INDEX_RANGE_RG071801_HPP
#endif

View File

@@ -10,8 +10,8 @@
// Andrew Lumsdaine
// See http://www.boost.org/libs/multi_array for documentation.
#ifndef ITERATOR_RG071801_HPP
#define ITERATOR_RG071801_HPP
#ifndef BOOST_MULTI_ARRAY_ITERATOR_HPP
#define BOOST_MULTI_ARRAY_ITERATOR_HPP
//
// iterator.hpp - implementation of iterators for the
@@ -162,4 +162,4 @@ public:
} // namespace detail
} // namespace boost
#endif // ITERATOR_RG071801_HPP
#endif

View File

@@ -10,8 +10,8 @@
// Andrew Lumsdaine
// See http://www.boost.org/libs/multi_array for documentation.
#ifndef BOOST_MULTI_ARRAY_REF_RG071801_HPP
#define BOOST_MULTI_ARRAY_REF_RG071801_HPP
#ifndef BOOST_MULTI_ARRAY_MULTI_ARRAY_REF_HPP
#define BOOST_MULTI_ARRAY_MULTI_ARRAY_REF_HPP
//
// multi_array_ref.hpp - code for creating "views" of array data.
@@ -619,4 +619,4 @@ protected:
} // namespace boost
#endif // BOOST_MULTI_ARRAY_REF_RG071801_HPP
#endif

View File

@@ -10,8 +10,8 @@
// Andrew Lumsdaine
// See http://www.boost.org/libs/multi_array for documentation.
#ifndef RANGE_LIST_RG072501_HPP
#define RANGE_LIST_RG072501_HPP
#ifndef BOOST_MULTI_ARRAY_RANGE_LIST_HPP
#define BOOST_MULTI_ARRAY_RANGE_LIST_HPP
//
// range_list.hpp - helper to build boost::arrays for *_set types
//
@@ -67,4 +67,4 @@ public:
} // namespace detail
} // namespace boost
#endif // RANGE_LIST_RG072501_HPP
#endif

View File

@@ -10,8 +10,8 @@
// Andrew Lumsdaine
// See http://www.boost.org/libs/multi_array for documentation.
#ifndef BOOST_STORAGE_ORDER_RG071801_HPP
#define BOOST_STORAGE_ORDER_RG071801_HPP
#ifndef BOOST_MULTI_ARRAY_STORAGE_ORDER_HPP
#define BOOST_MULTI_ARRAY_STORAGE_ORDER_HPP
#include "boost/multi_array/types.hpp"
#include "boost/array.hpp"
@@ -122,4 +122,4 @@ namespace boost {
} // namespace boost
#endif // BOOST_ARRAY_STORAGE_RG071801_HPP
#endif

View File

@@ -10,8 +10,8 @@
// Andrew Lumsdaine
// See http://www.boost.org/libs/multi_array for documentation.
#ifndef SUBARRAY_RG071801_HPP
#define SUBARRAY_RG071801_HPP
#ifndef BOOST_MULTI_ARRAY_SUBARRAY_HPP
#define BOOST_MULTI_ARRAY_SUBARRAY_HPP
//
// subarray.hpp - used to implement standard operator[] on
@@ -384,4 +384,4 @@ public:
};
} // namespace boost
#endif // SUBARRAY_RG071801_HPP
#endif

View File

@@ -11,8 +11,8 @@
// See http://www.boost.org/libs/multi_array for documentation.
#ifndef BOOST_MULTI_ARRAY_TYPES_RG071801_HPP
#define BOOST_MULTI_ARRAY_TYPES_RG071801_HPP
#ifndef BOOST_MULTI_ARRAY_TYPES_HPP
#define BOOST_MULTI_ARRAY_TYPES_HPP
//
// types.hpp - supply types that are needed by several headers
@@ -35,4 +35,4 @@ typedef std::ptrdiff_t index;
#endif // BOOST_MULTI_ARRAY_TYPES_RG071801_HPP
#endif

View File

@@ -10,8 +10,8 @@
// Andrew Lumsdaine
// See http://www.boost.org/libs/multi_array for documentation.
#ifndef BOOST_MULTI_ARRAY_VIEW_RG071301_HPP
#define BOOST_MULTI_ARRAY_VIEW_RG071301_HPP
#ifndef BOOST_MULTI_ARRAY_VIEW_HPP
#define BOOST_MULTI_ARRAY_VIEW_HPP
//
// view.hpp - code for creating "views" of array data.
@@ -457,5 +457,4 @@ public:
} // namespace boost
#endif // BOOST_MULTI_ARRAY_VIEW_RG071301_HPP
#endif

View File

@@ -1,5 +1,5 @@
#ifndef GENERATIVE_TESTS_RG072001_HPP
#define GENERATIVE_TESTS_RG072001_HPP
#ifndef BOOST_MULTI_ARRAY_GENERATIVE_TESTS_HPP
#define BOOST_MULTI_ARRAY_GENERATIVE_TESTS_HPP
// Copyright 2002 The Trustees of Indiana University.
@@ -279,4 +279,4 @@ int run_generative_tests() {
return boost::report_errors();
}
#endif // GENERATIVE_TESTS_RG072001_HPP
#endif