early-access version 3088

This commit is contained in:
pineappleEA
2022-11-05 15:35:56 +01:00
parent 4e4fc25ce3
commit b601909c6d
35519 changed files with 5996896 additions and 860 deletions

View File

@@ -0,0 +1,43 @@
//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// Adaptation to Boost of the libcxx
// Copyright 2010 Vicente J. Botet Escriba
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
#include <boost/chrono/chrono.hpp>
#include <boost/type_traits/is_same.hpp>
#if !defined(BOOST_NO_CXX11_STATIC_ASSERT)
#define NOTHING ""
#endif
template <class D1, class D2, class De>
void
test()
{
typedef typename boost::common_type<D1, D2>::type Dc;
BOOST_CHRONO_STATIC_ASSERT((boost::is_same<Dc, De>::value), NOTHING, (D1, D2, Dc, De));
}
void testall()
{
test<boost::chrono::duration<int, boost::ratio<1, 100> >,
boost::chrono::duration<long, boost::ratio<1, 1000> >,
boost::chrono::duration<long, boost::ratio<1, 1000> > >();
test<boost::chrono::duration<long, boost::ratio<1, 100> >,
boost::chrono::duration<int, boost::ratio<1, 1000> >,
boost::chrono::duration<long, boost::ratio<1, 1000> > >();
test<boost::chrono::duration<char, boost::ratio<1, 30> >,
boost::chrono::duration<short, boost::ratio<1, 1000> >,
boost::chrono::duration<int, boost::ratio<1, 3000> > >();
test<boost::chrono::duration<double, boost::ratio<21, 1> >,
boost::chrono::duration<short, boost::ratio<15, 1> >,
boost::chrono::duration<double, boost::ratio<3, 1> > >();
}

View File

@@ -0,0 +1,47 @@
//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// Adaptation to Boost of the libcxx
// Copyright 2010 Vicente J. Botet Escriba
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
#include <boost/chrono/chrono.hpp>
#include <boost/type_traits.hpp>
#if !defined(BOOST_NO_CXX11_STATIC_ASSERT)
#define NOTHING ""
#endif
template <class D1, class D2, class De>
void
test()
{
typedef boost::chrono::system_clock C;
typedef boost::chrono::time_point<C, D1> T1;
typedef boost::chrono::time_point<C, D2> T2;
typedef boost::chrono::time_point<C, De> Te;
typedef typename boost::common_type<T1, T2>::type Tc;
BOOST_CHRONO_STATIC_ASSERT((boost::is_same<Tc, Te>::value), NOTHING, (T1, T2, Tc, Te));
}
void testall()
{
test<boost::chrono::duration<int, boost::ratio<1, 100> >,
boost::chrono::duration<long, boost::ratio<1, 1000> >,
boost::chrono::duration<long, boost::ratio<1, 1000> > >();
test<boost::chrono::duration<long, boost::ratio<1, 100> >,
boost::chrono::duration<int, boost::ratio<1, 1000> >,
boost::chrono::duration<long, boost::ratio<1, 1000> > >();
test<boost::chrono::duration<char, boost::ratio<1, 30> >,
boost::chrono::duration<short, boost::ratio<1, 1000> >,
boost::chrono::duration<int, boost::ratio<1, 3000> > >();
test<boost::chrono::duration<double, boost::ratio<21, 1> >,
boost::chrono::duration<short, boost::ratio<15, 1> >,
boost::chrono::duration<double, boost::ratio<3, 1> > >();
}

View File

@@ -0,0 +1,41 @@
//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// Adaptation to Boost of the libcxx
// Copyright 2010 Vicente J. Botet Escriba
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
#include <boost/chrono/chrono.hpp>
#include <boost/type_traits.hpp>
#include <limits>
#include <boost/detail/lightweight_test.hpp>
#include "../rep.h"
int main()
{
BOOST_TEST((boost::chrono::duration_values<int>::min)() ==
(std::numeric_limits<int>::min)());
BOOST_TEST((boost::chrono::duration_values<double>::min)() ==
-(std::numeric_limits<double>::max)());
BOOST_TEST((boost::chrono::duration_values<Rep>::min)() ==
(std::numeric_limits<Rep>::min)());
BOOST_TEST((boost::chrono::duration_values<int>::max)() ==
(std::numeric_limits<int>::max)());
BOOST_TEST((boost::chrono::duration_values<double>::max)() ==
(std::numeric_limits<double>::max)());
BOOST_TEST((boost::chrono::duration_values<Rep>::max)() ==
(std::numeric_limits<Rep>::max)());
BOOST_TEST(boost::chrono::duration_values<int>::zero() == 0);
BOOST_TEST(boost::chrono::duration_values<Rep>::zero() == 0);
return boost::report_errors();
}

View File

@@ -0,0 +1,41 @@
//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// Adaptation to Boost of the libcxx
// Copyright 2010 Vicente J. Botet Escriba
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
#include <boost/chrono/chrono.hpp>
#include <boost/type_traits.hpp>
#if !defined(BOOST_NO_CXX11_STATIC_ASSERT)
#define NOTHING ""
#endif
template <class T>
void
test()
{
BOOST_CHRONO_STATIC_ASSERT((boost::is_base_of<boost::is_floating_point<T>,
boost::chrono::treat_as_floating_point<T> >::value), NOTHING, ());
}
struct A {};
void testall()
{
test<int>();
test<unsigned>();
test<char>();
test<bool>();
test<float>();
test<double>();
test<long double>();
test<A>();
}