Skip to content

Commit bf42400

Browse files
committed
Merging 'develop' into 'master' for 1.6.1
2 parents 07b4249 + 28699a4 commit bf42400

13 files changed

+707
-440
lines changed

.travis.yml

+7-10
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ matrix:
5757
# Xcode 9.1
5858
- os: osx
5959
env: UNIT_TESTS=true BOOST_VERSION=default
60-
osx_image: xcode9.1
60+
osx_image: xcode11
6161

6262
##########################################################################
6363
# Build with variations in the configuration
@@ -85,7 +85,7 @@ matrix:
8585
# Without exceptions on OS X
8686
- os: osx
8787
env: UNIT_TESTS=true BOOST_VERSION=default CMAKE_OPTIONS="-DBOOST_HANA_ENABLE_EXCEPTIONS=OFF"
88-
osx_image: xcode9.1
88+
osx_image: xcode11
8989

9090
# With Boost 1.64
9191
- env: UNIT_TESTS=true COMPILER=default BOOST_VERSION=1.64.0
@@ -106,14 +106,13 @@ matrix:
106106
# With Boost.Build instead of CMake (on OS X)
107107
- os: osx
108108
env: BOOST_BUILD=true BOOST_VERSION=default
109-
osx_image: xcode9.1
109+
osx_image: xcode11
110110

111111
##########################################################################
112112
# Generate the documentation
113113
##########################################################################
114-
- env: DOCUMENTATION=true COMPILER=default BOOST_VERSION=default
115-
dist: xenial
116-
addons: *defaults
114+
- os: osx
115+
env: DOCUMENTATION=true BOOST_VERSION=default
117116

118117
##########################################################################
119118
# Benchmarks
@@ -227,9 +226,7 @@ install:
227226
############################################################################
228227
- |
229228
if [[ "${DOCUMENTATION}" == "true" ]]; then
230-
DOXYGEN_URL="http://doxygen.nl/files/doxygen-1.8.15.linux.bin.tar.gz"
231-
mkdir doxygen && travis_retry wget --quiet -O - ${DOXYGEN_URL} | tar --strip-components=1 -xz -C doxygen
232-
export PATH=${DEPS_DIR}/doxygen/bin:${PATH}
229+
brew install doxygen
233230
doxygen --version
234231
fi
235232
@@ -284,7 +281,7 @@ script:
284281
############################################################################
285282
- |
286283
if [[ "${DOCUMENTATION}" == "true" ]]; then
287-
(cd build && ! make doc 2>&1 | grep -E "warning|error") || exit 1
284+
(cd build && ! make doc 2>&1 | grep -E "error") || exit 1
288285
289286
if [[ "${TRAVIS_PULL_REQUEST}" == "false" && "${TRAVIS_BRANCH}" == "master" ]]; then
290287
# Suppress output to avoid leaking the token when the command fails

README.md

+7-17
Original file line numberDiff line numberDiff line change
@@ -171,22 +171,13 @@ Please see [LICENSE.md](LICENSE.md).
171171
172172
173173
## Releasing
174-
This section acts as a reminder of the few simple steps required to release a
175-
new version of the library. This is only relevant to Hana's developers. To
176-
release a new version of the library, make sure the current version in
177-
`include/boost/hana/version.hpp` matches the release you're about to publish.
178-
Then, create an annotated tag with:
179-
```sh
180-
git tag -a --file=- v<version> <<EOM
181-
...your message here...
182-
EOM
183-
```
184-
185-
Then, push the tag and create a new GitHub release pointing to that tag. Make
186-
sure to include the release notes in `RELEASE_NOTES.md` in that GitHub release.
187-
Once that is done, bump the version number in `include/boost/hana/version.hpp`
188-
so that it matches the next _planned_ release. Finally, do not forget to update
189-
the [Homebrew formula][] to point to the latest version.
174+
To release a new version of Hana, use the `util/release.sh` script. The script
175+
will merge `develop` to `master`, create a tag on `master` and then bump the
176+
version on `develop`. The tag on `master` will be annotated with the contents
177+
of the `RELEASE_NOTES.md` file. Once the `release.sh` script has been run, the
178+
`master` and `develop` branches should be pushed manually, as well as the tag
179+
that was created on `master`. Finally, create a GitHub release pointing to the
180+
new tag on `master`.
190181
191182
192183
<!-- Links -->
@@ -200,4 +191,3 @@ the [Homebrew formula][] to point to the latest version.
200191
[eRuby]: http://en.wikipedia.org/wiki/ERuby
201192
[Hana.docs]: http://boostorg.github.io/hana
202193
[Hana.wiki]: https://github.com/boostorg/hana/wiki
203-
[Homebrew formula]: https://github.com/Homebrew/homebrew-core/blob/master/Formula/hana.rb

RELEASE_NOTES.md

+9-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1-
## These are the Release notes for the next release of Hana
2-
- Official support for Xcode 6, 7 and 8, and LLVM Clang 3.5, 3.6, 3.7, and 3.8
3-
has has been dropped. The library should still work with these compilers,
4-
however they are not being tested regularly anymore, so they are not
5-
officially supported.
1+
Release notes for Hana 1.6.1
2+
============================
3+
4+
- Official support for Xcode 6, 7 and 8, 9, 10 and LLVM Clang 3.5, 3.6, 3.7,
5+
and 3.8 has has been dropped. The library should still work with these
6+
compilers, however they are not being tested regularly anymore, so they are
7+
not officially supported.
8+
- The `hana::traits::result_of` trait has been removed. Since `std::result_of`
9+
has been removed from the Standard in C++20, users should move away from it.

doc/js/highcharts-data.js

+35-20
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

doc/js/highcharts-exporting.js

+37-18
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

doc/js/highcharts.js

+533-332
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

doc/tutorial.hpp

+11-21
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,7 @@ have a couple of options:
5252
Hana is included in the [Boost][] distribution starting from Boost 1.61.0, so
5353
installing that will give you access to Hana.
5454
55-
2. __Use Homebrew__\n
56-
On Mac OS, Hana can be installed with [Homebrew][]:
57-
@code{.sh}
58-
brew install hana
59-
@endcode
60-
61-
3. __Install manually__\n
55+
2. __Install manually__\n
6256
You can download the code from the official GitHub [repository][Hana.repository]
6357
and install the library manually by issuing the following commands from the root
6458
of the project (requires [CMake][]):
@@ -78,22 +72,18 @@ If you just want to contribute to Hana, you can see how to best setup your
7872
environment for development in the [README][Hana.hacking].
7973
8074
@note
81-
- Both the manual installation and the Homebrew installation will also install
82-
a `HanaConfig.cmake` file for use with CMake and a `hana.pc` file for use with
83-
[pkg-config][].
84-
85-
- Do not mix a standalone installation of Hana (i.e. Hana not installed through
86-
Boost) with a full installation of Boost. The Hana provided within Boost and
87-
the standalone one may clash, and you won't know which version is used where.
88-
This is asking for trouble.
75+
Do not mix a standalone installation of Hana (i.e. Hana not installed through
76+
Boost) with a full installation of Boost. The Hana provided within Boost and
77+
the standalone one may clash, and you won't know which version is used where.
78+
This is asking for trouble.
8979
9080
@subsection tutorial-installation-cmake Note for CMake users
9181
92-
If you use [CMake][], depending on Hana has never been so easy. When installed,
93-
Hana creates a `HanaConfig.cmake` file that exports the `hana` interface library
94-
target with all the required settings. All you need is to install Hana (through
95-
Homebrew or manually), use `find_package(Hana)`, and then link your own targets
96-
against the `hana` target. Here is a minimal example of doing this:
82+
If you use [CMake][], depending on Hana has never been so easy. When installed
83+
manually, Hana creates a `HanaConfig.cmake` file that exports the `hana`
84+
interface library target with all the required settings. All you need is to
85+
install Hana manually with CMake, use `find_package(Hana)`, and then link your
86+
own targets against the `hana` target. Here is a minimal example of doing this:
9787
9888
@snippet example/cmake_integration/CMakeLists.txt snip
9989
@@ -206,7 +196,7 @@ constexpr int factorial(int n) {
206196
}
207197
208198
template <typename T, std::size_t N, typename F>
209-
constexpr std::array<std::result_of_t<F(T)>, N>
199+
constexpr std::array<std::invoke_result_t<F, T>, N>
210200
transform(std::array<T, N> array, F f) {
211201
// ...
212202
}

include/boost/hana/string.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ BOOST_HANA_NAMESPACE_BEGIN
117117
constexpr auto operator"" _s() {
118118
static_assert(std::is_same<CharT, char>::value,
119119
"hana::string: Only narrow string literals are supported with "
120-
"the _s string literal right now. See https://goo.gl/fBbKD7 "
120+
"the _s string literal right now. See https://github.com/boostorg/hana/issues/80 "
121121
"if you need support for fancier types of compile-time strings.");
122122
return hana::string_c<s...>;
123123
}

include/boost/hana/traits.hpp

-1
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,6 @@ BOOST_HANA_NAMESPACE_BEGIN namespace traits {
194194

195195
constexpr auto common_type = metafunction<std::common_type>;
196196
constexpr auto underlying_type = metafunction<std::underlying_type>;
197-
constexpr auto result_of = metafunction<std::result_of>;
198197

199198

200199
///////////////////////

include/boost/hana/version.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Distributed under the Boost Software License, Version 1.0.
2828

2929
//! @ingroup group-config
3030
//! Macro expanding to the patch level of the library, i.e. the `z` in `x.y.z`.
31-
#define BOOST_HANA_PATCH_VERSION 0
31+
#define BOOST_HANA_PATCH_VERSION 1
3232

3333
//! @ingroup group-config
3434
//! Macro expanding to the full version of the library, in hexadecimal

test/functional/apply.cpp

-12
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,6 @@ void test_b12(Functor&& f) {
6363
);
6464
static_assert(std::is_same<DeducedReturnType, Expect>::value, "");
6565

66-
// Check that result_of_t matches Expect.
67-
using ResultOfReturnType = typename std::result_of<ClassFunc&&(Functor&&, NonCopyable&&)>::type;
68-
static_assert(std::is_same<ResultOfReturnType, Expect>::value, "");
69-
7066
// Run invoke and check the return value.
7167
DeducedReturnType ret = hana::apply(func_ptr, std::forward<Functor>(f), std::move(arg));
7268
BOOST_HANA_RUNTIME_CHECK(ret == 42);
@@ -84,10 +80,6 @@ void test_b34(Functor&& f) {
8480
);
8581
static_assert(std::is_same<DeducedReturnType, Expect>::value, "");
8682

87-
// Check that result_of_t matches Expect.
88-
using ResultOfReturnType = typename std::result_of<ClassFunc&&(Functor&&)>::type;
89-
static_assert(std::is_same<ResultOfReturnType, Expect>::value, "");
90-
9183
// Run invoke and check the return value.
9284
DeducedReturnType ret = hana::apply(func_ptr, std::forward<Functor>(f));
9385
BOOST_HANA_RUNTIME_CHECK(ret == 42);
@@ -103,10 +95,6 @@ void test_b5(Functor&& f) {
10395
);
10496
static_assert(std::is_same<DeducedReturnType, Expect>::value, "");
10597

106-
// Check that result_of_t matches Expect.
107-
using ResultOfReturnType = typename std::result_of<Functor&&(NonCopyable&&)>::type;
108-
static_assert(std::is_same<ResultOfReturnType, Expect>::value, "");
109-
11098
// Run invoke and check the return value.
11199
DeducedReturnType ret = hana::apply(std::forward<Functor>(f), std::move(arg));
112100
BOOST_HANA_RUNTIME_CHECK(ret == 42);

test/type/traits.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,6 @@ int main() {
144144

145145
hana::traits::common_type(s, s);
146146
hana::traits::underlying_type(e);
147-
using FunctionPointer = void(*)();
148-
hana::traits::result_of(hana::type_c<FunctionPointer(void)>);
149147

150148
///////////////////////
151149
// Utilities

util/release.sh

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
5+
PROGNAME="$(basename "${0}")"
6+
function usage() {
7+
cat <<EOF
8+
Usage:
9+
${PROGNAME} <next-version>
10+
11+
This script merges 'develop' to 'master' and tags a release on the 'master'
12+
branch. It then bumps the version on 'develop' to the next planned version.
13+
<next-version> must be of the form X.Y.Z, where X, Y and Z are numbers.
14+
15+
This script should be run from the root of the repository without any
16+
uncommitted changes.
17+
EOF
18+
}
19+
20+
for arg in $@; do
21+
if [[ "${arg}" == "-h" || "${arg}" == "--help" ]]; then
22+
usage
23+
exit 0
24+
fi
25+
done
26+
27+
if [[ $# -ne 1 ]]; then
28+
echo "Missing the version"
29+
usage
30+
exit 1
31+
fi
32+
33+
next_version="${1}"
34+
next_major="$(echo ${next_version} | cut -d '.' -f 1)"
35+
next_minor="$(echo ${next_version} | cut -d '.' -f 2)"
36+
next_patch="$(echo ${next_version} | cut -d '.' -f 3)"
37+
if [[ -z "${next_major}" || -z "${next_minor}" || -z "${next_patch}" ]]; then
38+
echo "The version was specified incorrectly"
39+
usage
40+
exit 1
41+
fi
42+
43+
current_major="$(sed -n -E 's/#define BOOST_HANA_MAJOR_VERSION ([0-9]+)/\1/p' include/boost/hana/version.hpp)"
44+
current_minor="$(sed -n -E 's/#define BOOST_HANA_MINOR_VERSION ([0-9]+)/\1/p' include/boost/hana/version.hpp)"
45+
current_patch="$(sed -n -E 's/#define BOOST_HANA_PATCH_VERSION ([0-9]+)/\1/p' include/boost/hana/version.hpp)"
46+
current_version="${current_major}.${current_minor}.${current_patch}"
47+
48+
git checkout --quiet master
49+
git merge --quiet develop -m "Merging 'develop' into 'master' for ${current_version}"
50+
echo "Merged 'develop' into 'master' -- you should push 'master' when ready"
51+
52+
tag="v${current_major}.${current_minor}.${current_patch}"
53+
git tag -a --file=RELEASE_NOTES.md "${tag}"
54+
echo "Created tag ${tag} on 'master' -- you should push it when ready"
55+
56+
git checkout --quiet develop
57+
sed -i '' -E "s/#define BOOST_HANA_MAJOR_VERSION [0-9]+/#define BOOST_HANA_MAJOR_VERSION ${next_major}/" include/boost/hana/version.hpp
58+
sed -i '' -E "s/#define BOOST_HANA_MINOR_VERSION [0-9]+/#define BOOST_HANA_MINOR_VERSION ${next_minor}/" include/boost/hana/version.hpp
59+
sed -i '' -E "s/#define BOOST_HANA_PATCH_VERSION [0-9]+/#define BOOST_HANA_PATCH_VERSION ${next_patch}/" include/boost/hana/version.hpp
60+
cat <<EOF > RELEASE_NOTES.md
61+
Release notes for Hana ${next_version}
62+
============================
63+
EOF
64+
git add include/boost/hana/version.hpp RELEASE_NOTES.md
65+
git commit --quiet -m "Bump version of Hana to ${next_version} and clear release notes"
66+
echo "Bumped the version of Hana on 'develop' to ${next_version} -- you should push 'develop' when ready"

0 commit comments

Comments
 (0)