forked from boostorg/tuple
removing tabs
[SVN r13783]
This commit is contained in:
@ -42,7 +42,7 @@
|
|||||||
|
|
||||||
#include "boost/type_traits/cv_traits.hpp"
|
#include "boost/type_traits/cv_traits.hpp"
|
||||||
#include "boost/type_traits/function_traits.hpp"
|
#include "boost/type_traits/function_traits.hpp"
|
||||||
|
|
||||||
namespace boost {
|
namespace boost {
|
||||||
namespace tuples {
|
namespace tuples {
|
||||||
|
|
||||||
@ -862,6 +862,6 @@ tie(T1& t1, T2& t2, T3& t3, T4& t4, T5& t5, T6& t6, T7& t7, T8& t8,
|
|||||||
#undef BOOST_TUPLE_DUMMY_PARM
|
#undef BOOST_TUPLE_DUMMY_PARM
|
||||||
#undef BOOST_TUPLE_SINGLE_DUMMY_PARM
|
#undef BOOST_TUPLE_SINGLE_DUMMY_PARM
|
||||||
|
|
||||||
#endif // BOOST_TUPLE_BASIC_HPP
|
#endif // BOOST_TUPLE_BASIC_HPP
|
||||||
|
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||||
|
|
||||||
namespace boost {
|
namespace boost {
|
||||||
|
|
||||||
using tuples::tuple;
|
using tuples::tuple;
|
||||||
using tuples::make_tuple;
|
using tuples::make_tuple;
|
||||||
@ -85,4 +85,4 @@ get(const tuples::cons<Head, Tail>& t, tuples::detail::workaround_holder<N>* = 0
|
|||||||
} // end namespace boost
|
} // end namespace boost
|
||||||
|
|
||||||
|
|
||||||
#endif // BOOST_TUPLE_HPP
|
#endif // BOOST_TUPLE_HPP
|
||||||
|
@ -177,4 +177,4 @@ inline bool operator>=(const cons<T1, T2>& lhs, const cons<S1, S2>& rhs)
|
|||||||
} // end of namespace boost
|
} // end of namespace boost
|
||||||
|
|
||||||
|
|
||||||
#endif // BOOST_TUPLE_COMPARISON_HPP
|
#endif // BOOST_TUPLE_COMPARISON_HPP
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
# if (__GNUC__ == 2 && __GNUC_MINOR__ <= 97)
|
# if (__GNUC__ == 2 && __GNUC_MINOR__ <= 97)
|
||||||
#define BOOST_NO_TEMPLATED_STREAMS
|
#define BOOST_NO_TEMPLATED_STREAMS
|
||||||
#endif
|
#endif
|
||||||
#endif // __GNUC__
|
#endif // __GNUC__
|
||||||
|
|
||||||
#if defined BOOST_NO_TEMPLATED_STREAMS
|
#if defined BOOST_NO_TEMPLATED_STREAMS
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
@ -36,8 +36,6 @@
|
|||||||
|
|
||||||
#include "boost/tuple/tuple.hpp"
|
#include "boost/tuple/tuple.hpp"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
namespace boost {
|
namespace boost {
|
||||||
namespace tuples {
|
namespace tuples {
|
||||||
|
|
||||||
@ -71,8 +69,8 @@ public:
|
|||||||
// parentheses and space are the default manipulators
|
// parentheses and space are the default manipulators
|
||||||
if (!c) {
|
if (!c) {
|
||||||
switch(m) {
|
switch(m) {
|
||||||
case open : c = '('; break;
|
case open : c = '('; break;
|
||||||
case close : c = ')'; break;
|
case close : c = ')'; break;
|
||||||
case delimiter : c = ' '; break;
|
case delimiter : c = ' '; break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -94,8 +92,8 @@ public:
|
|||||||
// parentheses and space are the default manipulators
|
// parentheses and space are the default manipulators
|
||||||
if (!c) {
|
if (!c) {
|
||||||
switch(m) {
|
switch(m) {
|
||||||
case open : c = i.widen('('); break;
|
case open : c = i.widen('('); break;
|
||||||
case close : c = i.widen(')'); break;
|
case close : c = i.widen(')'); break;
|
||||||
case delimiter : c = i.widen(' '); break;
|
case delimiter : c = i.widen(' '); break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -112,7 +110,7 @@ public:
|
|||||||
// convertible long.
|
// convertible long.
|
||||||
i.iword(get_stream_index(m)) = static_cast<long>(c);
|
i.iword(get_stream_index(m)) = static_cast<long>(c);
|
||||||
}
|
}
|
||||||
#endif // BOOST_NO_TEMPLATED_STREAMS
|
#endif // BOOST_NO_TEMPLATED_STREAMS
|
||||||
};
|
};
|
||||||
|
|
||||||
} // end of namespace detail
|
} // end of namespace detail
|
||||||
@ -141,8 +139,8 @@ public:
|
|||||||
void set(std::basic_ios<CharType, CharTrait> &io) const {
|
void set(std::basic_ios<CharType, CharTrait> &io) const {
|
||||||
detail::format_info::set_manipulator(io, mt, f_c);
|
detail::format_info::set_manipulator(io, mt, f_c);
|
||||||
}
|
}
|
||||||
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||||
#endif // BOOST_NO_TEMPLATED_STREAMS
|
#endif // BOOST_NO_TEMPLATED_STREAMS
|
||||||
};
|
};
|
||||||
|
|
||||||
#if defined (BOOST_NO_TEMPLATED_STREAMS)
|
#if defined (BOOST_NO_TEMPLATED_STREAMS)
|
||||||
@ -212,7 +210,7 @@ template<class T1>
|
|||||||
inline std::ostream& print(std::ostream& o, const cons<T1, null_type>& t) {
|
inline std::ostream& print(std::ostream& o, const cons<T1, null_type>& t) {
|
||||||
return o << t.head;
|
return o << t.head;
|
||||||
}
|
}
|
||||||
#endif // BOOST_NO_TEMPLATED_STREAMS
|
#endif // BOOST_NO_TEMPLATED_STREAMS
|
||||||
|
|
||||||
inline std::ostream& print(std::ostream& o, const null_type&) { return o; }
|
inline std::ostream& print(std::ostream& o, const null_type&) { return o; }
|
||||||
|
|
||||||
@ -226,7 +224,7 @@ print(std::ostream& o, const cons<T1, T2>& t) {
|
|||||||
|
|
||||||
#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
|
#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
|
||||||
if (tuples::length<T2>::value == 0)
|
if (tuples::length<T2>::value == 0)
|
||||||
return o;
|
return o;
|
||||||
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||||
o << d;
|
o << d;
|
||||||
|
|
||||||
@ -263,14 +261,14 @@ print(std::basic_ostream<CharType, CharTrait>& o, const cons<T1, T2>& t) {
|
|||||||
|
|
||||||
#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
|
#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
|
||||||
if (tuples::length<T2>::value == 0)
|
if (tuples::length<T2>::value == 0)
|
||||||
return o;
|
return o;
|
||||||
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||||
o << d;
|
o << d;
|
||||||
|
|
||||||
return print(o, t.tail);
|
return print(o, t.tail);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // BOOST_NO_TEMPLATED_STREAMS
|
#endif // BOOST_NO_TEMPLATED_STREAMS
|
||||||
|
|
||||||
} // namespace detail
|
} // namespace detail
|
||||||
|
|
||||||
@ -314,7 +312,7 @@ operator<<(std::basic_ostream<CharType, CharTrait>& o,
|
|||||||
|
|
||||||
return o;
|
return o;
|
||||||
}
|
}
|
||||||
#endif // BOOST_NO_TEMPLATED_STREAMS
|
#endif // BOOST_NO_TEMPLATED_STREAMS
|
||||||
|
|
||||||
|
|
||||||
// -------------------------------------------------------------
|
// -------------------------------------------------------------
|
||||||
@ -357,7 +355,7 @@ read (std::istream &is, cons<T1, null_type>& t1) {
|
|||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
inline std::istream& read(std::istream& i, const null_type&) { return i; }
|
inline std::istream& read(std::istream& i, const null_type&) { return i; }
|
||||||
#endif // !BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
#endif // !BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||||
|
|
||||||
template<class T1, class T2>
|
template<class T1, class T2>
|
||||||
inline std::istream&
|
inline std::istream&
|
||||||
@ -369,7 +367,7 @@ read(std::istream &is, cons<T1, T2>& t1) {
|
|||||||
|
|
||||||
#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
|
#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
|
||||||
if (tuples::length<T2>::value == 0)
|
if (tuples::length<T2>::value == 0)
|
||||||
return is;
|
return is;
|
||||||
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||||
|
|
||||||
extract_and_check_delimiter(is, format_info::delimiter);
|
extract_and_check_delimiter(is, format_info::delimiter);
|
||||||
@ -444,7 +442,7 @@ template<class CharType, class CharTrait>
|
|||||||
inline std::basic_istream<CharType, CharTrait>&
|
inline std::basic_istream<CharType, CharTrait>&
|
||||||
read(std::basic_istream<CharType, CharTrait>& i, const null_type&) { return i; }
|
read(std::basic_istream<CharType, CharTrait>& i, const null_type&) { return i; }
|
||||||
|
|
||||||
#endif // !BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
#endif // !BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||||
|
|
||||||
template<class CharType, class CharTrait, class T1, class T2>
|
template<class CharType, class CharTrait, class T1, class T2>
|
||||||
inline std::basic_istream<CharType, CharTrait>&
|
inline std::basic_istream<CharType, CharTrait>&
|
||||||
@ -456,7 +454,7 @@ read(std::basic_istream<CharType, CharTrait> &is, cons<T1, T2>& t1) {
|
|||||||
|
|
||||||
#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
|
#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
|
||||||
if (tuples::length<T2>::value == 0)
|
if (tuples::length<T2>::value == 0)
|
||||||
return is;
|
return is;
|
||||||
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||||
|
|
||||||
extract_and_check_delimiter(is, format_info::delimiter);
|
extract_and_check_delimiter(is, format_info::delimiter);
|
||||||
@ -494,11 +492,11 @@ operator>>(std::basic_istream<CharType, CharTrait>& is, cons<T1, T2>& t1) {
|
|||||||
return is;
|
return is;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // BOOST_NO_TEMPLATED_STREAMS
|
#endif // BOOST_NO_TEMPLATED_STREAMS
|
||||||
|
|
||||||
} // end of namespace tuples
|
} // end of namespace tuples
|
||||||
} // end of namespace boost
|
} // end of namespace boost
|
||||||
|
|
||||||
#endif // BOOST_TUPLE_IO_HPP
|
#endif // BOOST_TUPLE_IO_HPP
|
||||||
|
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ int test_main(int argc, char * argv[] ) {
|
|||||||
|
|
||||||
// When teading tuples from a stream, manipulators must be set correctly:
|
// When teading tuples from a stream, manipulators must be set correctly:
|
||||||
ifstream tmp3("temp.tmp");
|
ifstream tmp3("temp.tmp");
|
||||||
tuple<string, string, int> j;
|
tuple<string, string, int> j;
|
||||||
|
|
||||||
#if !defined (BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
|
#if !defined (BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
|
||||||
tmp3 >> j;
|
tmp3 >> j;
|
||||||
|
@ -186,7 +186,7 @@ void element_access_test()
|
|||||||
|
|
||||||
double e = get<1>(t);
|
double e = get<1>(t);
|
||||||
BOOST_TEST(e > 2.69 && e < 2.71);
|
BOOST_TEST(e > 2.69 && e < 2.71);
|
||||||
|
|
||||||
get<1>(t) = 3.14+i;
|
get<1>(t) = 3.14+i;
|
||||||
BOOST_TEST(get<1>(t) > 4.13 && get<1>(t) < 4.15);
|
BOOST_TEST(get<1>(t) > 4.13 && get<1>(t) < 4.15);
|
||||||
|
|
||||||
@ -214,7 +214,7 @@ void element_access_test()
|
|||||||
|
|
||||||
double e = get<1>(t);
|
double e = get<1>(t);
|
||||||
BOOST_TEST(e > 2.69 && e < 2.71);
|
BOOST_TEST(e > 2.69 && e < 2.71);
|
||||||
|
|
||||||
get<1>(t) = 3.14+i;
|
get<1>(t) = 3.14+i;
|
||||||
BOOST_TEST(get<1>(t) > 4.13 && get<1>(t) < 4.15);
|
BOOST_TEST(get<1>(t) > 4.13 && get<1>(t) < 4.15);
|
||||||
|
|
||||||
@ -308,7 +308,7 @@ make_tuple_test()
|
|||||||
|
|
||||||
// the result of make_tuple is assignable:
|
// the result of make_tuple is assignable:
|
||||||
BOOST_TEST(make_tuple(2, 4, 6) ==
|
BOOST_TEST(make_tuple(2, 4, 6) ==
|
||||||
(make_tuple(1, 2, 3) = make_tuple(2, 4, 6)));
|
(make_tuple(1, 2, 3) = make_tuple(2, 4, 6)));
|
||||||
|
|
||||||
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
|
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
|
||||||
make_tuple("Donald", "Daisy"); // should work;
|
make_tuple("Donald", "Daisy"); // should work;
|
||||||
|
Reference in New Issue
Block a user