forked from boostorg/function
Compare commits
10 Commits
svn-branch
...
svn-branch
Author | SHA1 | Date | |
---|---|---|---|
fa7b9cbdfe | |||
1b60e82b2f | |||
7581949360 | |||
0b2aeda226 | |||
2ecd62c612 | |||
47033bd162 | |||
c7d5016022 | |||
d92355cca2 | |||
0123f84bff | |||
0207da8008 |
@ -1,3 +1,8 @@
|
|||||||
|
# Copyright (c) 2002 Douglas Gregor <doug.gregor -at- gmail.com>
|
||||||
|
|
||||||
|
# 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)
|
||||||
project boost/doc ;
|
project boost/doc ;
|
||||||
import boostbook : boostbook ;
|
import boostbook : boostbook ;
|
||||||
|
|
||||||
|
@ -1,4 +1,11 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
Copyright (c) 2002 Douglas Gregor <doug.gregor -at- gmail.com>
|
||||||
|
|
||||||
|
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)
|
||||||
|
-->
|
||||||
<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
|
<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
|
||||||
"http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
|
"http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
|
||||||
<section id="function.faq" last-revision="$Date$">
|
<section id="function.faq" last-revision="$Date$">
|
||||||
|
@ -1,4 +1,11 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
Copyright (c) 2002 Douglas Gregor <doug.gregor -at- gmail.com>
|
||||||
|
|
||||||
|
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)
|
||||||
|
-->
|
||||||
<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
|
<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
|
||||||
"http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
|
"http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
|
||||||
<section id="function.history" last-revision="$Date$">
|
<section id="function.history" last-revision="$Date$">
|
||||||
|
@ -1,4 +1,11 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
Copyright (c) 2002 Douglas Gregor <doug.gregor -at- gmail.com>
|
||||||
|
|
||||||
|
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)
|
||||||
|
-->
|
||||||
<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
|
<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
|
||||||
"http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
|
"http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
|
||||||
<section id="function.misc" last-revision="$Date$">
|
<section id="function.misc" last-revision="$Date$">
|
||||||
|
@ -1,4 +1,11 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
Copyright (c) 2002 Douglas Gregor <doug.gregor -at- gmail.com>
|
||||||
|
|
||||||
|
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)
|
||||||
|
-->
|
||||||
<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
|
<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
|
||||||
"http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
|
"http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
|
||||||
|
|
||||||
|
@ -1,4 +1,11 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
Copyright (c) 2002 Douglas Gregor <doug.gregor -at- gmail.com>
|
||||||
|
|
||||||
|
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)
|
||||||
|
-->
|
||||||
<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
|
<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
|
||||||
"http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
|
"http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
|
||||||
<testsuite id="function.testsuite" last-revision="$Date$">
|
<testsuite id="function.testsuite" last-revision="$Date$">
|
||||||
|
@ -1,4 +1,11 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
Copyright (c) 2002 Douglas Gregor <doug.gregor -at- gmail.com>
|
||||||
|
|
||||||
|
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)
|
||||||
|
-->
|
||||||
<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
|
<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
|
||||||
"http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
|
"http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
|
||||||
<section xmlns:xi="http://www.w3.org/2001/XInclude" id="function.tutorial"
|
<section xmlns:xi="http://www.w3.org/2001/XInclude" id="function.tutorial"
|
||||||
|
@ -21,8 +21,8 @@
|
|||||||
// in anything that may be included by function_template.hpp doesn't break
|
// in anything that may be included by function_template.hpp doesn't break
|
||||||
#include <boost/function/detail/prologue.hpp>
|
#include <boost/function/detail/prologue.hpp>
|
||||||
|
|
||||||
// Visual Age C++ doesn't handle the file iteration well
|
// Older versions of the IBM C++ compiler do not handle file iterations well
|
||||||
#if BOOST_WORKAROUND(__IBMCPP__, >= 500)
|
#if BOOST_WORKAROUND(__IBMCPP__, >= 500) && BOOST_WORKAROUND(__IBMCPP__, < 800)
|
||||||
# if BOOST_FUNCTION_MAX_ARGS >= 0
|
# if BOOST_FUNCTION_MAX_ARGS >= 0
|
||||||
# include <boost/function/function0.hpp>
|
# include <boost/function/function0.hpp>
|
||||||
# endif
|
# endif
|
||||||
|
@ -284,10 +284,8 @@ namespace boost {
|
|||||||
reinterpret_cast<const functor_type*>(&in_buffer.data);
|
reinterpret_cast<const functor_type*>(&in_buffer.data);
|
||||||
new ((void*)&out_buffer.data) functor_type(*in_functor);
|
new ((void*)&out_buffer.data) functor_type(*in_functor);
|
||||||
} else if (op == destroy_functor_tag) {
|
} else if (op == destroy_functor_tag) {
|
||||||
functor_type* out_functor =
|
|
||||||
reinterpret_cast<functor_type*>(&out_buffer.data);
|
|
||||||
// Some compilers (Borland, vc6, ...) are unhappy with ~functor_type.
|
// Some compilers (Borland, vc6, ...) are unhappy with ~functor_type.
|
||||||
out_functor->~Functor();
|
reinterpret_cast<functor_type*>(&out_buffer.data)->~Functor();
|
||||||
} else /* op == check_functor_type_tag */ {
|
} else /* op == check_functor_type_tag */ {
|
||||||
const std::type_info& check_type =
|
const std::type_info& check_type =
|
||||||
*static_cast<const std::type_info*>(out_buffer.const_obj_ptr);
|
*static_cast<const std::type_info*>(out_buffer.const_obj_ptr);
|
||||||
|
@ -70,6 +70,16 @@
|
|||||||
# define BOOST_FUNCTION_RETURN(X) X; return BOOST_FUNCTION_VOID_RETURN_TYPE ()
|
# define BOOST_FUNCTION_RETURN(X) X; return BOOST_FUNCTION_VOID_RETURN_TYPE ()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef BOOST_MSVC
|
||||||
|
# pragma warning(push)
|
||||||
|
# pragma warning(disable: 4127) // conditional expression is constant.
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef BOOST_MSVC
|
||||||
|
# pragma warning(push)
|
||||||
|
# pragma warning(disable: 4127) // conditional expression is constant.
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace boost {
|
namespace boost {
|
||||||
namespace detail {
|
namespace detail {
|
||||||
namespace function {
|
namespace function {
|
||||||
@ -788,11 +798,19 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef BOOST_MSVC
|
||||||
|
# pragma warning(pop)
|
||||||
|
#endif
|
||||||
|
|
||||||
#undef BOOST_FUNCTION_PARTIAL_SPEC
|
#undef BOOST_FUNCTION_PARTIAL_SPEC
|
||||||
#endif // have partial specialization
|
#endif // have partial specialization
|
||||||
|
|
||||||
} // end namespace boost
|
} // end namespace boost
|
||||||
|
|
||||||
|
#ifdef BOOST_MSVC
|
||||||
|
# pragma warning(pop)
|
||||||
|
#endif
|
||||||
|
|
||||||
// Cleanup after ourselves...
|
// Cleanup after ourselves...
|
||||||
#undef BOOST_FUNCTION_VTABLE
|
#undef BOOST_FUNCTION_VTABLE
|
||||||
#undef BOOST_FUNCTION_DEFAULT_ALLOCATOR
|
#undef BOOST_FUNCTION_DEFAULT_ALLOCATOR
|
||||||
|
13
index.html
13
index.html
@ -1,9 +1,20 @@
|
|||||||
<html>
|
<html>
|
||||||
|
<!--
|
||||||
|
Copyright (c) 2002 Douglas Gregor <doug.gregor -at- gmail.com>
|
||||||
|
|
||||||
|
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)
|
||||||
|
-->
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="refresh" content="0; URL=../../doc/html/function.html">
|
<meta http-equiv="refresh" content="0; URL=../../doc/html/function.html">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
Automatic redirection failed, please go to
|
Automatic redirection failed, please go to
|
||||||
<a href="../../doc/html/function.html">../../doc/html/function.html</a>
|
<a href="../../doc/html/function.html">../../doc/html/function.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>
|
68
test/Jamfile
68
test/Jamfile
@ -1,68 +0,0 @@
|
|||||||
# Function library
|
|
||||||
|
|
||||||
# Copyright (C) 2001-2003 Douglas Gregor
|
|
||||||
|
|
||||||
# Use, modification and distribution is 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)
|
|
||||||
|
|
||||||
# For more information, see http://www.boost.org/
|
|
||||||
|
|
||||||
|
|
||||||
# Testing Jamfile autogenerated from XML source
|
|
||||||
subproject libs/function/test ;
|
|
||||||
|
|
||||||
# bring in rules for testing
|
|
||||||
SEARCH on testing.jam = $(BOOST_BUILD_PATH) ;
|
|
||||||
include testing.jam ;
|
|
||||||
|
|
||||||
# Make tests run by default.
|
|
||||||
DEPENDS all : test ;
|
|
||||||
|
|
||||||
{
|
|
||||||
# look in BOOST_ROOT for sources first, just in this Jamfile
|
|
||||||
local SEARCH_SOURCE = $(BOOST_ROOT) $(SEARCH_SOURCE) ;
|
|
||||||
|
|
||||||
test-suite function
|
|
||||||
:
|
|
||||||
[ run libs/function/test/function_test.cpp : : : : lib_function_test ]
|
|
||||||
|
|
||||||
[ run libs/function/test/function_n_test.cpp : : : : ]
|
|
||||||
|
|
||||||
[ run libs/function/test/allocator_test.cpp : : : : ]
|
|
||||||
|
|
||||||
[ run libs/function/test/stateless_test.cpp : : : : ]
|
|
||||||
|
|
||||||
[ run libs/function/test/lambda_test.cpp : : : : ]
|
|
||||||
|
|
||||||
[ compile-fail libs/function/test/function_test_fail1.cpp : : : : ]
|
|
||||||
|
|
||||||
[ compile-fail libs/function/test/function_test_fail2.cpp : : : : ]
|
|
||||||
|
|
||||||
[ compile libs/function/test/function_30.cpp : : : : ]
|
|
||||||
|
|
||||||
[ run libs/function/test/function_arith_cxx98.cpp : : : : ]
|
|
||||||
|
|
||||||
[ run libs/function/test/function_arith_portable.cpp : : : : ]
|
|
||||||
|
|
||||||
[ run libs/function/test/sum_avg_cxx98.cpp : : : : ]
|
|
||||||
|
|
||||||
[ run libs/function/test/sum_avg_portable.cpp : : : : ]
|
|
||||||
|
|
||||||
[ run libs/function/test/mem_fun_cxx98.cpp : : : : ]
|
|
||||||
|
|
||||||
[ run libs/function/test/mem_fun_portable.cpp : : : : ]
|
|
||||||
|
|
||||||
[ run libs/function/test/std_bind_cxx98.cpp : : : : ]
|
|
||||||
|
|
||||||
[ run libs/function/test/std_bind_portable.cpp : : : : ]
|
|
||||||
|
|
||||||
[ run libs/function/test/function_ref_cxx98.cpp : : : : ]
|
|
||||||
|
|
||||||
[ run libs/function/test/function_ref_portable.cpp : : : : ]
|
|
||||||
|
|
||||||
[ run libs/function/test/contains_test.cpp : : : : ]
|
|
||||||
|
|
||||||
[ run libs/function/test/contains2_test.cpp : : : : ]
|
|
||||||
;
|
|
||||||
}
|
|
Reference in New Issue
Block a user