mirror of
https://github.com/boostorg/tuple.git
synced 2025-07-28 11:47:21 +02:00
Compare commits
16 Commits
feature/st
...
boost-1.76
Author | SHA1 | Date | |
---|---|---|---|
a4dff52f67 | |||
cf820922ac | |||
c4addf9795 | |||
87ff02bf79 | |||
9fd6a5e2c6 | |||
ddaa127cee | |||
19f7cfdcdb | |||
504a70bd04 | |||
72f2e7535e | |||
1e0276741b | |||
0b724234ce | |||
292f3f9dc8 | |||
30794afc61 | |||
b8e982cd6f | |||
37ef42e2c3 | |||
327c1c4fe0 |
22
CMakeLists.txt
Normal file
22
CMakeLists.txt
Normal file
@ -0,0 +1,22 @@
|
||||
# Copyright 2018 Mike Dev
|
||||
# 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
|
||||
#
|
||||
# NOTE: CMake support for Boost.Tuple is currently experimental at best
|
||||
# and the interface is likely to change in the future
|
||||
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
project(BoostTuple)
|
||||
|
||||
add_library(boost_tuple INTERFACE)
|
||||
add_library(Boost::tuple ALIAS boost_tuple)
|
||||
|
||||
target_include_directories(boost_tuple INTERFACE include)
|
||||
|
||||
target_link_libraries(boost_tuple
|
||||
INTERFACE
|
||||
Boost::config
|
||||
Boost::core
|
||||
Boost::static_assert
|
||||
Boost::type_traits
|
||||
)
|
@ -141,7 +141,7 @@ private:
|
||||
typedef BOOST_DEDUCED_TYPENAME detail::drop_front<N>::BOOST_NESTED_TEMPLATE
|
||||
apply<T>::type::head_type unqualified_type;
|
||||
public:
|
||||
#if BOOST_WORKAROUND(__BORLANDC__,<0x600)
|
||||
#if BOOST_WORKAROUND(BOOST_BORLANDC,<0x600)
|
||||
typedef const unqualified_type type;
|
||||
#else
|
||||
typedef BOOST_DEDUCED_TYPENAME boost::add_const<unqualified_type>::type type;
|
||||
@ -310,6 +310,7 @@ struct cons {
|
||||
tail (t2, t3, t4, t5, t6, t7, t8, t9, t10, detail::cnull())
|
||||
{}
|
||||
|
||||
cons( const cons& u ) : head(u.head), tail(u.tail) {}
|
||||
|
||||
template <class HT2, class TT2>
|
||||
cons( const cons<HT2, TT2>& u ) : head(u.head), tail(u.tail) {}
|
||||
@ -389,6 +390,8 @@ struct cons<HT, null_type> {
|
||||
const null_type&, const null_type&, const null_type&)
|
||||
: head () {}
|
||||
|
||||
cons( const cons& u ) : head(u.head) {}
|
||||
|
||||
template <class HT2>
|
||||
cons( const cons<HT2, null_type>& u ) : head(u.head) {}
|
||||
|
||||
|
@ -71,34 +71,46 @@ get(const tuples::cons<HT, TT>& c) {
|
||||
namespace std
|
||||
{
|
||||
|
||||
#if defined(BOOST_CLANG)
|
||||
# pragma clang diagnostic push
|
||||
# pragma clang diagnostic ignored "-Wmismatched-tags"
|
||||
#endif
|
||||
|
||||
// std::tuple_size
|
||||
|
||||
template<class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10>
|
||||
struct tuple_size< boost::tuples::tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> >:
|
||||
boost::tuples::length< boost::tuples::tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> >
|
||||
class tuple_size< boost::tuples::tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> >:
|
||||
public boost::tuples::length< boost::tuples::tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> >
|
||||
{
|
||||
};
|
||||
|
||||
template<class H, class T> struct tuple_size< boost::tuples::cons<H, T> >: boost::tuples::length< boost::tuples::cons<H, T> >
|
||||
template<class H, class T> class tuple_size< boost::tuples::cons<H, T> >:
|
||||
public boost::tuples::length< boost::tuples::cons<H, T> >
|
||||
{
|
||||
};
|
||||
|
||||
template<> struct tuple_size< boost::tuples::null_type >: boost::tuples::length< boost::tuples::null_type >
|
||||
template<> class tuple_size< boost::tuples::null_type >:
|
||||
public boost::tuples::length< boost::tuples::null_type >
|
||||
{
|
||||
};
|
||||
|
||||
// std::tuple_element
|
||||
|
||||
template<std::size_t I, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9, class T10>
|
||||
struct tuple_element< I, boost::tuples::tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> >:
|
||||
boost::tuples::element< I, boost::tuples::tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> >
|
||||
class tuple_element< I, boost::tuples::tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> >:
|
||||
public boost::tuples::element< I, boost::tuples::tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> >
|
||||
{
|
||||
};
|
||||
|
||||
template<std::size_t I, class H, class T> struct tuple_element< I, boost::tuples::cons<H, T> >: boost::tuples::element< I, boost::tuples::cons<H, T> >
|
||||
template<std::size_t I, class H, class T> class tuple_element< I, boost::tuples::cons<H, T> >:
|
||||
public boost::tuples::element< I, boost::tuples::cons<H, T> >
|
||||
{
|
||||
};
|
||||
|
||||
#if defined(BOOST_CLANG)
|
||||
# pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
} // namespace std
|
||||
|
||||
#endif // !defined(BOOST_NO_CXX11_HDR_TUPLE)
|
||||
|
@ -102,7 +102,7 @@ class tuple_manipulator {
|
||||
CharType f_c;
|
||||
public:
|
||||
explicit tuple_manipulator(detail::format_info::manipulator_type m,
|
||||
const char c = 0)
|
||||
CharType c = CharType())
|
||||
: mt(m), f_c(c) {}
|
||||
|
||||
template<class CharTrait>
|
||||
@ -259,7 +259,7 @@ extract_and_check_delimiter(
|
||||
|
||||
#if defined (BOOST_NO_STD_LOCALE)
|
||||
const bool is_delimiter = !isspace(d);
|
||||
#elif defined ( __BORLANDC__ )
|
||||
#elif defined ( BOOST_BORLANDC )
|
||||
const bool is_delimiter = !std::use_facet< std::ctype< CharType > >
|
||||
(is.getloc() ).is( std::ctype_base::space, d);
|
||||
#else
|
||||
|
@ -81,7 +81,7 @@ typedef tuple<std::string, std::pair<A, B> > t4;
|
||||
typedef tuple<A*, tuple<const A*, const B&, C>, bool, void*> t5;
|
||||
typedef tuple<volatile int, const volatile char&, int(&)(float) > t6;
|
||||
|
||||
# if !defined(__BORLANDC__) || __BORLAND__ > 0x0551
|
||||
# if !defined(BOOST_BORLANDC) || BOOST_BORLANDC > 0x0551
|
||||
typedef tuple<B(A::*)(C&), A&> t7;
|
||||
#endif
|
||||
|
||||
@ -306,7 +306,7 @@ make_tuple_test()
|
||||
|
||||
// With function pointers, make_tuple works just fine
|
||||
|
||||
#if !defined(__BORLANDC__) || __BORLAND__ > 0x0551
|
||||
#if !defined(BOOST_BORLANDC) || BOOST_BORLANDC > 0x0551
|
||||
make_tuple(&make_tuple_test);
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user