mirror of
https://github.com/boostorg/tuple.git
synced 2025-06-28 21:41:03 +02:00
Compare commits
16 Commits
svn-branch
...
boost-1.39
Author | SHA1 | Date | |
---|---|---|---|
cc664e00f9 | |||
700d64acc8 | |||
ff6b861ed7 | |||
99039c3db8 | |||
785ada83f4 | |||
57c6d6fd00 | |||
591a9a3ddf | |||
310c0cda3f | |||
e3455e7ddf | |||
ec599f4b77 | |||
31af4e8ec5 | |||
c493a8938d | |||
8bc4064ec5 | |||
3e7b7f407d | |||
88163596d0 | |||
588c928e5a |
21
CMakeLists.txt
Normal file
21
CMakeLists.txt
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
#----------------------------------------------------------------------------
|
||||||
|
# This file was automatically generated from the original CMakeLists.txt file
|
||||||
|
# Add a variable to hold the headers for the library
|
||||||
|
set (lib_headers
|
||||||
|
tuple
|
||||||
|
)
|
||||||
|
|
||||||
|
# Add a library target to the build system
|
||||||
|
boost_library_project(
|
||||||
|
tuple
|
||||||
|
# SRCDIRS
|
||||||
|
TESTDIRS test
|
||||||
|
HEADERS ${lib_headers}
|
||||||
|
# DOCDIRS
|
||||||
|
DESCRIPTION "Ease definition of functions returning multiple values, and more."
|
||||||
|
MODULARIZED
|
||||||
|
AUTHORS "Jaakko Jarvi <jarvi -at- cs.tamu.edu>"
|
||||||
|
# MAINTAINERS
|
||||||
|
)
|
||||||
|
|
||||||
|
|
@ -2,14 +2,13 @@
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Tuple library advanced features</title>
|
<title>Tuple library advanced features</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
<body bgcolor="#FFFFFF" text="#000000">
|
<body bgcolor="#FFFFFF" text="#000000">
|
||||||
|
|
||||||
<IMG SRC="../../../boost.png"
|
<IMG SRC="../../../boost.png"
|
||||||
ALT="C++ Boost" width="277" height="86">
|
ALT="C++ Boost" width="277" height="86">
|
||||||
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<h1>Tuple library advanced features</h1>
|
<h1>Tuple library advanced features</h1>
|
||||||
|
|
||||||
The advanced features described in this document are all under namespace <code>::boost::tuples</code>
|
The advanced features described in this document are all under namespace <code>::boost::tuples</code>
|
||||||
@ -101,7 +100,7 @@ For a one-element cons list the tail argument (<code>null_type</code>) can be om
|
|||||||
<p>
|
<p>
|
||||||
The template <code>access_traits</code> defines three type functions. Let <code>T</code> be a type of an element in a tuple:
|
The template <code>access_traits</code> defines three type functions. Let <code>T</code> be a type of an element in a tuple:
|
||||||
<ol>
|
<ol>
|
||||||
<li><code>access_traits<T>::type</code> maps <code>T</code> to the return type of the non-const access functions (nonmeber and member <code>get</code> functions, and the <code>get_head</code> function).</li>
|
<li><code>access_traits<T>::non_const_type</code> maps <code>T</code> to the return type of the non-const access functions (nonmeber and member <code>get</code> functions, and the <code>get_head</code> function).</li>
|
||||||
<li><code>access_traits<T>::const_type</code> maps <code>T</code> to the return type of the const access functions.</li>
|
<li><code>access_traits<T>::const_type</code> maps <code>T</code> to the return type of the const access functions.</li>
|
||||||
<li><code>access_traits<T>::parameter_type</code> maps <code>T</code> to the parameter type of the tuple constructor.</li>
|
<li><code>access_traits<T>::parameter_type</code> maps <code>T</code> to the parameter type of the tuple constructor.</li>
|
||||||
</ol>
|
</ol>
|
||||||
|
@ -516,7 +516,7 @@ Järvi J.: <i>ML-Style Tuple Assignment in Standard C++ - Extending the Mult
|
|||||||
|
|
||||||
<p>Last modified 2003-09-07</p>
|
<p>Last modified 2003-09-07</p>
|
||||||
|
|
||||||
<p>© Copyright <a href="../../../people/jaakko_jarvi.htm"> Jaakko Järvi</a> 2001.
|
<p>© Copyright <a href="http://www.boost.org/people/jaakko_jarvi.htm"> Jaakko Järvi</a> 2001.
|
||||||
|
|
||||||
Permission to copy, use, modify, sell and distribute this software and its documentation is granted provided this copyright notice appears in all copies.
|
Permission to copy, use, modify, sell and distribute this software and its documentation is granted provided this copyright notice appears in all copies.
|
||||||
This software and its documentation is provided "as is" without express or implied warranty, and with no claim as to its suitability for any purpose.
|
This software and its documentation is provided "as is" without express or implied warranty, and with no claim as to its suitability for any purpose.
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// tuple_basic.hpp -----------------------------------------------------
|
// tuple_basic.hpp -----------------------------------------------------
|
||||||
|
|
||||||
// Copyright (C) 1999, 2000 Jaakko J<EFBFBD>rvi (jaakko.jarvi@cs.utu.fi)
|
// Copyright (C) 1999, 2000 Jaakko Jarvi (jaakko.jarvi@cs.utu.fi)
|
||||||
//
|
//
|
||||||
// Distributed under the Boost Software License, Version 1.0. (See
|
// Distributed under the Boost Software License, Version 1.0. (See
|
||||||
// accompanying file LICENSE_1_0.txt or copy at
|
// accompanying file LICENSE_1_0.txt or copy at
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// - tuple_basic_no_partial_spec.hpp -----------------------------------------
|
// - tuple_basic_no_partial_spec.hpp -----------------------------------------
|
||||||
|
|
||||||
// Copyright (C) 1999, 2000 Jaakko J<EFBFBD>rvi (jaakko.jarvi@cs.utu.fi)
|
// Copyright (C) 1999, 2000 Jaakko Jarvi (jaakko.jarvi@cs.utu.fi)
|
||||||
// Copyright (C) 2001 Douglas Gregor (gregod@rpi.edu)
|
// Copyright (C) 2001 Douglas Gregor (gregod@rpi.edu)
|
||||||
// Copyright (C) 2001 Gary Powell (gary.powell@sierra.com)
|
// Copyright (C) 2001 Gary Powell (gary.powell@sierra.com)
|
||||||
//
|
//
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// tuple.hpp - Boost Tuple Library --------------------------------------
|
// tuple.hpp - Boost Tuple Library --------------------------------------
|
||||||
|
|
||||||
// Copyright (C) 1999, 2000 Jaakko J<EFBFBD>rvi (jaakko.jarvi@cs.utu.fi)
|
// Copyright (C) 1999, 2000 Jaakko Jarvi (jaakko.jarvi@cs.utu.fi)
|
||||||
//
|
//
|
||||||
// Distributed under the Boost Software License, Version 1.0. (See
|
// Distributed under the Boost Software License, Version 1.0. (See
|
||||||
// accompanying file LICENSE_1_0.txt or copy at
|
// accompanying file LICENSE_1_0.txt or copy at
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// tuple_comparison.hpp -----------------------------------------------------
|
// tuple_comparison.hpp -----------------------------------------------------
|
||||||
//
|
//
|
||||||
// Copyright (C) 2001 Jaakko J<EFBFBD>rvi (jaakko.jarvi@cs.utu.fi)
|
// Copyright (C) 2001 Jaakko Jarvi (jaakko.jarvi@cs.utu.fi)
|
||||||
// Copyright (C) 2001 Gary Powell (gary.powell@sierra.com)
|
// Copyright (C) 2001 Gary Powell (gary.powell@sierra.com)
|
||||||
//
|
//
|
||||||
// Distributed under the Boost Software License, Version 1.0. (See
|
// Distributed under the Boost Software License, Version 1.0. (See
|
||||||
@ -69,8 +69,8 @@ inline bool neq<null_type,null_type>(const null_type&, const null_type&) { retur
|
|||||||
template<class T1, class T2>
|
template<class T1, class T2>
|
||||||
inline bool lt(const T1& lhs, const T2& rhs) {
|
inline bool lt(const T1& lhs, const T2& rhs) {
|
||||||
return lhs.get_head() < rhs.get_head() ||
|
return lhs.get_head() < rhs.get_head() ||
|
||||||
!(rhs.get_head() < lhs.get_head()) &&
|
( !(rhs.get_head() < lhs.get_head()) &&
|
||||||
lt(lhs.get_tail(), rhs.get_tail());
|
lt(lhs.get_tail(), rhs.get_tail()));
|
||||||
}
|
}
|
||||||
template<>
|
template<>
|
||||||
inline bool lt<null_type,null_type>(const null_type&, const null_type&) { return false; }
|
inline bool lt<null_type,null_type>(const null_type&, const null_type&) { return false; }
|
||||||
@ -78,8 +78,8 @@ inline bool lt<null_type,null_type>(const null_type&, const null_type&) { return
|
|||||||
template<class T1, class T2>
|
template<class T1, class T2>
|
||||||
inline bool gt(const T1& lhs, const T2& rhs) {
|
inline bool gt(const T1& lhs, const T2& rhs) {
|
||||||
return lhs.get_head() > rhs.get_head() ||
|
return lhs.get_head() > rhs.get_head() ||
|
||||||
!(rhs.get_head() > lhs.get_head()) &&
|
( !(rhs.get_head() > lhs.get_head()) &&
|
||||||
gt(lhs.get_tail(), rhs.get_tail());
|
gt(lhs.get_tail(), rhs.get_tail()));
|
||||||
}
|
}
|
||||||
template<>
|
template<>
|
||||||
inline bool gt<null_type,null_type>(const null_type&, const null_type&) { return false; }
|
inline bool gt<null_type,null_type>(const null_type&, const null_type&) { return false; }
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// tuple_io.hpp --------------------------------------------------------------
|
// tuple_io.hpp --------------------------------------------------------------
|
||||||
|
|
||||||
// Copyright (C) 2001 Jaakko J<EFBFBD>rvi (jaakko.jarvi@cs.utu.fi)
|
// Copyright (C) 2001 Jaakko Jarvi (jaakko.jarvi@cs.utu.fi)
|
||||||
// 2001 Gary Powell (gary.powell@sierra.com)
|
// 2001 Gary Powell (gary.powell@sierra.com)
|
||||||
//
|
//
|
||||||
// Distributed under the Boost Software License, Version 1.0. (See
|
// Distributed under the Boost Software License, Version 1.0. (See
|
||||||
|
@ -3,6 +3,11 @@
|
|||||||
<meta http-equiv="refresh" content="0; URL=doc/tuple_users_guide.html">
|
<meta http-equiv="refresh" content="0; URL=doc/tuple_users_guide.html">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
Automatic redirection failed, please go to <a href="doc/tuple_users_guide.html">doc/tuple_users_guide.html</a>
|
Automatic redirection failed, please go to <a href="doc/tuple_users_guide.html">doc/tuple_users_guide.html</a>
|
||||||
|
<hr>
|
||||||
|
<p><EFBFBD> Copyright Beman Dawes, 2001</p>
|
||||||
|
<p>Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||||
|
file <a href="../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or copy
|
||||||
|
at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</p>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
2
module.cmake
Normal file
2
module.cmake
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
boost_module(tuple DEPENDS static_assert)
|
||||||
|
|
5
test/CMakeLists.txt
Normal file
5
test/CMakeLists.txt
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
boost_additional_test_dependencies(tuple BOOST_DEPENDS test)
|
||||||
|
|
||||||
|
|
||||||
|
boost_test_run(tuple_test_bench DEPENDS boost_test_exec_monitor)
|
||||||
|
boost_test_run(io_test DEPENDS boost_test_exec_monitor)
|
24
test/Jamfile
24
test/Jamfile
@ -1,20 +1,8 @@
|
|||||||
subproject libs/tuple/test ;
|
|
||||||
|
|
||||||
unit-test tuple_test_bench
|
project : requirements <library>/boost/test//boost_test_exec_monitor ;
|
||||||
: tuple_test_bench.cpp
|
|
||||||
<lib>../../test/build/boost_test_exec_monitor
|
|
||||||
: <sysinclude>$(BOOST_ROOT)
|
|
||||||
;
|
|
||||||
|
|
||||||
unit-test io_test
|
|
||||||
: io_test.cpp
|
|
||||||
<lib>../../test/build/boost_test_exec_monitor
|
|
||||||
: <sysinclude>$(BOOST_ROOT)
|
|
||||||
;
|
|
||||||
|
|
||||||
unit-test another_tuple_test_bench
|
|
||||||
: another_tuple_test_bench.cpp
|
|
||||||
<lib>../../test/build/boost_test_exec_monitor
|
|
||||||
: <sysinclude>$(BOOST_ROOT)
|
|
||||||
;
|
|
||||||
|
|
||||||
|
test-suite tuple :
|
||||||
|
[ run tuple_test_bench.cpp ]
|
||||||
|
[ run io_test.cpp ]
|
||||||
|
[ run another_tuple_test_bench.cpp ]
|
||||||
|
;
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright (C) 1999, 2000 Jaakko J<EFBFBD>rvi (jaakko.jarvi@cs.utu.fi)
|
// Copyright (C) 1999, 2000 Jaakko Jarvi (jaakko.jarvi@cs.utu.fi)
|
||||||
//
|
//
|
||||||
// Distributed under the Boost Software License, Version 1.0. (See
|
// Distributed under the Boost Software License, Version 1.0. (See
|
||||||
// accompanying file LICENSE_1_0.txt or copy at
|
// accompanying file LICENSE_1_0.txt or copy at
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright (C) 1999, 2000 Jaakko J<EFBFBD>rvi (jaakko.jarvi@cs.utu.fi)
|
// Copyright (C) 1999, 2000 Jaakko Jarvi (jaakko.jarvi@cs.utu.fi)
|
||||||
//
|
//
|
||||||
// Distributed under the Boost Software License, Version 1.0. (See
|
// Distributed under the Boost Software License, Version 1.0. (See
|
||||||
// accompanying file LICENSE_1_0.txt or copy at
|
// accompanying file LICENSE_1_0.txt or copy at
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright (C) 1999, 2000 Jaakko J<EFBFBD>rvi (jaakko.jarvi@cs.utu.fi)
|
// Copyright (C) 1999, 2000 Jaakko Jarvi (jaakko.jarvi@cs.utu.fi)
|
||||||
//
|
//
|
||||||
// Distributed under the Boost Software License, Version 1.0. (See
|
// Distributed under the Boost Software License, Version 1.0. (See
|
||||||
// accompanying file LICENSE_1_0.txt or copy at
|
// accompanying file LICENSE_1_0.txt or copy at
|
||||||
|
Reference in New Issue
Block a user