mirror of
https://github.com/boostorg/histogram.git
synced 2025-05-11 13:14:06 +00:00
Fix nothrow-move-assignable failures in travis
* new tests of nothrow move assignment for builtin axis types * switch to xenial, which apparently comes with a different glibc version that adds a nothrow move assignment operator for std::string
This commit is contained in:
parent
ecd142080d
commit
97f8b7dd91
@ -2,17 +2,13 @@
|
||||
# subject to 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)
|
||||
#
|
||||
# Copyright Antony Polukhin 2014-2019.
|
||||
# Copyright Hans Dembinski 2019.
|
||||
|
||||
#
|
||||
# See https://svn.boost.org/trac/boost/wiki/TravisCoverals for description of the
|
||||
# original file and how it can be used with Boost libraries.
|
||||
#
|
||||
# Based on original work by Antony Polukhin, see https://svn.boost.org/trac/boost/wiki/TravisCoveralss
|
||||
|
||||
sudo: false
|
||||
language: cpp
|
||||
os: linux
|
||||
dist: xenial
|
||||
|
||||
branches:
|
||||
only:
|
||||
|
@ -10,11 +10,15 @@
|
||||
#include <limits>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <type_traits>
|
||||
#include "utility_axis.hpp"
|
||||
|
||||
using namespace boost::histogram;
|
||||
|
||||
int main() {
|
||||
BOOST_TEST(std::is_nothrow_move_assignable<axis::category<int>>::value);
|
||||
BOOST_TEST(std::is_nothrow_move_assignable<axis::category<std::string>>::value);
|
||||
|
||||
// bad_ctors
|
||||
{
|
||||
auto empty = std::vector<int>(0);
|
||||
|
@ -8,11 +8,14 @@
|
||||
#include <boost/histogram/axis/integer.hpp>
|
||||
#include <boost/histogram/detail/throw_exception.hpp>
|
||||
#include <limits>
|
||||
#include <type_traits>
|
||||
#include "utility_axis.hpp"
|
||||
|
||||
using namespace boost::histogram;
|
||||
|
||||
int main() {
|
||||
BOOST_TEST(std::is_nothrow_move_assignable<axis::integer<>>::value);
|
||||
|
||||
// bad_ctor
|
||||
{
|
||||
BOOST_TEST_THROWS(axis::integer<>(1, 1), std::invalid_argument);
|
||||
|
@ -9,14 +9,16 @@
|
||||
#include <boost/histogram/detail/throw_exception.hpp>
|
||||
#include <limits>
|
||||
#include <sstream>
|
||||
#include <type_traits>
|
||||
#include "is_close.hpp"
|
||||
#include "utility_axis.hpp"
|
||||
|
||||
using namespace boost::histogram;
|
||||
namespace tr = axis::transform;
|
||||
using def = use_default;
|
||||
|
||||
int main() {
|
||||
using def = use_default;
|
||||
BOOST_TEST(std::is_nothrow_move_assignable<axis::regular<>>::value);
|
||||
|
||||
// bad_ctors
|
||||
{
|
||||
|
@ -8,6 +8,7 @@
|
||||
#include <boost/histogram/axis/variable.hpp>
|
||||
#include <boost/histogram/detail/throw_exception.hpp>
|
||||
#include <limits>
|
||||
#include <type_traits>
|
||||
#include <vector>
|
||||
#include "is_close.hpp"
|
||||
#include "utility_axis.hpp"
|
||||
@ -15,6 +16,8 @@
|
||||
using namespace boost::histogram;
|
||||
|
||||
int main() {
|
||||
BOOST_TEST(std::is_nothrow_move_assignable<axis::variable<>>::value);
|
||||
|
||||
// bad_ctors
|
||||
{
|
||||
auto empty = std::vector<double>(0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user