mirror of
https://github.com/boostorg/utility.git
synced 2025-10-13 17:15:19 +02:00
Compare commits
18 Commits
sandbox-br
...
svn-branch
Author | SHA1 | Date | |
---|---|---|---|
|
4e1128e55c | ||
|
3de5974419 | ||
|
7eb1536590 | ||
|
9339431e03 | ||
|
f2349baf7d | ||
|
8745ca628a | ||
|
ba61e9d796 | ||
|
afe74fffbc | ||
|
09a0137016 | ||
|
a1d3ec6c53 | ||
|
5be3004e6c | ||
|
d387905150 | ||
|
b514e40733 | ||
|
b02677375f | ||
|
61a6015b5a | ||
|
682032a340 | ||
|
67afd7e315 | ||
|
75cf20cace |
@@ -85,7 +85,7 @@
|
|||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
<p><a href="http://validator.w3.org/check?uri=referer"><img border="0" src=
|
<p><a href="http://validator.w3.org/check?uri=referer"><img border="0" src=
|
||||||
"http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01 Transitional"
|
"../../doc/images/valid-html401.png" alt="Valid HTML 4.01 Transitional"
|
||||||
height="31" width="88"></a></p>
|
height="31" width="88"></a></p>
|
||||||
|
|
||||||
<p>Revised
|
<p>Revised
|
||||||
|
@@ -1,31 +0,0 @@
|
|||||||
#----------------------------------------------------------------------------
|
|
||||||
# This file was automatically generated from the original CMakeLists.txt file
|
|
||||||
# Add a variable to hold the headers for the library
|
|
||||||
set (lib_headers
|
|
||||||
assert.hpp
|
|
||||||
call_traits.hpp
|
|
||||||
checked_delete.hpp
|
|
||||||
compressed_pair.hpp
|
|
||||||
current_function.hpp
|
|
||||||
operators.hpp
|
|
||||||
throw_exception.hpp
|
|
||||||
utility.hpp
|
|
||||||
utility
|
|
||||||
)
|
|
||||||
|
|
||||||
# Add a library target to the build system
|
|
||||||
boost_library_project(
|
|
||||||
utility
|
|
||||||
# SRCDIRS
|
|
||||||
TESTDIRS test
|
|
||||||
HEADERS ${lib_headers}
|
|
||||||
# DOCDIRS
|
|
||||||
DESCRIPTION "Various small utilities for C++ programming."
|
|
||||||
MODULARIZED
|
|
||||||
AUTHORS "David Abrahams <dave -at- boostpro.com>"
|
|
||||||
"Brad King"
|
|
||||||
"Douglas Gregor <doug.gregor -at- gmail.com>"
|
|
||||||
# MAINTAINERS
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
@@ -509,7 +509,7 @@ Returns the largest size that this Collection can ever have. <A href="#8">[8]</A
|
|||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
<p><a href="http://validator.w3.org/check?uri=referer"><img border="0" src=
|
<p><a href="http://validator.w3.org/check?uri=referer"><img border="0" src=
|
||||||
"http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01 Transitional"
|
"../../doc/images/valid-html401.png" alt="Valid HTML 4.01 Transitional"
|
||||||
height="31" width="88"></a></p>
|
height="31" width="88"></a></p>
|
||||||
|
|
||||||
<p>Revised
|
<p>Revised
|
||||||
|
@@ -160,7 +160,7 @@ t.~T()
|
|||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
<p><a href="http://validator.w3.org/check?uri=referer"><img border="0" src=
|
<p><a href="http://validator.w3.org/check?uri=referer"><img border="0" src=
|
||||||
"http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01 Transitional"
|
"../../doc/images/valid-html401.png" alt="Valid HTML 4.01 Transitional"
|
||||||
height="31" width="88"></a></p>
|
height="31" width="88"></a></p>
|
||||||
|
|
||||||
<p>Revised
|
<p>Revised
|
||||||
|
@@ -185,7 +185,7 @@
|
|||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
<p><a href="http://validator.w3.org/check?uri=referer"><img border="0" src=
|
<p><a href="http://validator.w3.org/check?uri=referer"><img border="0" src=
|
||||||
"http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01 Transitional"
|
"../../doc/images/valid-html401.png" alt="Valid HTML 4.01 Transitional"
|
||||||
height="31" width="88"></a></p>
|
height="31" width="88"></a></p>
|
||||||
|
|
||||||
<p>Revised
|
<p>Revised
|
||||||
|
@@ -70,7 +70,7 @@
|
|||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
<p><a href="http://validator.w3.org/check?uri=referer"><img border="0" src=
|
<p><a href="http://validator.w3.org/check?uri=referer"><img border="0" src=
|
||||||
"http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01 Transitional"
|
"../../doc/images/valid-html401.png" alt="Valid HTML 4.01 Transitional"
|
||||||
height="31" width="88"></a></p>
|
height="31" width="88"></a></p>
|
||||||
|
|
||||||
<p>Revised
|
<p>Revised
|
||||||
|
@@ -281,7 +281,7 @@ object_id_compare::operator ()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return a.second->before( *b.second );
|
return a.second->before( *b.second ) != 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -11,6 +11,10 @@
|
|||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
|
|
||||||
|
#ifdef BOOST_MSVC
|
||||||
|
#pragma warning(disable:4996) // warning C4996: 'std::equal': Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators'
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Note: This file tests every single valid bit-grouping on its own, and some
|
Note: This file tests every single valid bit-grouping on its own, and some
|
||||||
random combinations of bit-groupings.
|
random combinations of bit-groupings.
|
||||||
|
@@ -21,6 +21,10 @@
|
|||||||
#include <libs/type_traits/test/test.hpp>
|
#include <libs/type_traits/test/test.hpp>
|
||||||
#include <libs/type_traits/test/check_type.hpp>
|
#include <libs/type_traits/test/check_type.hpp>
|
||||||
|
|
||||||
|
#ifdef BOOST_MSVC
|
||||||
|
#pragma warning(disable:4181) // : warning C4181: qualifier applied to reference type; ignored
|
||||||
|
#endif
|
||||||
|
|
||||||
// a way prevent warnings for unused variables
|
// a way prevent warnings for unused variables
|
||||||
template<class T> inline void unused_variable(const T&) {}
|
template<class T> inline void unused_variable(const T&) {}
|
||||||
|
|
||||||
@@ -52,7 +56,8 @@ struct contained
|
|||||||
const_reference const_get()const { return v_; }
|
const_reference const_get()const { return v_; }
|
||||||
// pass value:
|
// pass value:
|
||||||
void call(param_type){}
|
void call(param_type){}
|
||||||
|
private:
|
||||||
|
contained& operator=(const contained&);
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||||
@@ -77,6 +82,8 @@ struct contained<T[N]>
|
|||||||
reference get() { return v_; }
|
reference get() { return v_; }
|
||||||
const_reference const_get()const { return v_; }
|
const_reference const_get()const { return v_; }
|
||||||
void call(param_type){}
|
void call(param_type){}
|
||||||
|
private:
|
||||||
|
contained& operator=(const contained&);
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -197,7 +204,7 @@ struct comparible_UDT
|
|||||||
bool operator == (const comparible_UDT& v){ return v.i_ == i_; }
|
bool operator == (const comparible_UDT& v){ return v.i_ == i_; }
|
||||||
};
|
};
|
||||||
|
|
||||||
int main(int argc, char *argv[ ])
|
int main()
|
||||||
{
|
{
|
||||||
call_traits_checker<comparible_UDT> c1;
|
call_traits_checker<comparible_UDT> c1;
|
||||||
comparible_UDT u;
|
comparible_UDT u;
|
||||||
|
@@ -146,7 +146,7 @@ int main()
|
|||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
<p><a href="http://validator.w3.org/check?uri=referer"><img border="0" src=
|
<p><a href="http://validator.w3.org/check?uri=referer"><img border="0" src=
|
||||||
"http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01 Transitional"
|
"../../doc/images/valid-html401.png" alt="Valid HTML 4.01 Transitional"
|
||||||
height="31" width="88"></a></p>
|
height="31" width="88"></a></p>
|
||||||
|
|
||||||
<p>Revised
|
<p>Revised
|
||||||
|
@@ -117,7 +117,7 @@ The following simplified example shows the basic idea. A complete example follow
|
|||||||
<pre>struct C
|
<pre>struct C
|
||||||
{
|
{
|
||||||
template<class InPlaceFactory>
|
template<class InPlaceFactory>
|
||||||
C ( InPlaceFactory const& aFactoty )
|
C ( InPlaceFactory const& aFactory )
|
||||||
:
|
:
|
||||||
contained_ ( uninitialized_storage() )
|
contained_ ( uninitialized_storage() )
|
||||||
{
|
{
|
||||||
|
@@ -6,14 +6,6 @@
|
|||||||
#ifndef UUID_1D94A7C6054E11DB9804B622A1EF5492
|
#ifndef UUID_1D94A7C6054E11DB9804B622A1EF5492
|
||||||
#define UUID_1D94A7C6054E11DB9804B622A1EF5492
|
#define UUID_1D94A7C6054E11DB9804B622A1EF5492
|
||||||
|
|
||||||
#include <boost/exception/diagnostic_information.hpp>
|
#error The header <boost/exception.hpp> has been deprecated. Please #include <boost/exception/all.hpp> instead.
|
||||||
#include <boost/exception/error_info.hpp>
|
|
||||||
#include <boost/exception/exception.hpp>
|
|
||||||
#include <boost/exception/get_error_info.hpp>
|
|
||||||
#include <boost/exception/info.hpp>
|
|
||||||
#include <boost/exception/info_tuple.hpp>
|
|
||||||
#ifndef BOOST_NO_EXCEPTIONS
|
|
||||||
#include <boost/exception_ptr.hpp>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -27,6 +27,9 @@ template<class T> struct addr_impl_ref
|
|||||||
|
|
||||||
inline addr_impl_ref( T & v ): v_( v ) {}
|
inline addr_impl_ref( T & v ): v_( v ) {}
|
||||||
inline operator T& () const { return v_; }
|
inline operator T& () const { return v_; }
|
||||||
|
|
||||||
|
private:
|
||||||
|
addr_impl_ref & operator=(const addr_impl_ref &);
|
||||||
};
|
};
|
||||||
|
|
||||||
template<class T> struct addressof_impl
|
template<class T> struct addressof_impl
|
||||||
|
@@ -1 +0,0 @@
|
|||||||
boost_module(utility DEPENDS iterator exception detail )
|
|
@@ -445,6 +445,9 @@ const point<float> pi_over_4_normalized = pi_over_4 / length(pi_over_4);
|
|||||||
optional template parameter <code>B</code>, which is not shown, for the
|
optional template parameter <code>B</code>, which is not shown, for the
|
||||||
<a href="#chaining">base class chaining</a> technique.</p>
|
<a href="#chaining">base class chaining</a> technique.</p>
|
||||||
|
|
||||||
|
<p>The primary operand type <code>T</code> needs to be of class type,
|
||||||
|
built-in types are not supported.</p>
|
||||||
|
|
||||||
<table cellpadding="5" border="1" align="center">
|
<table cellpadding="5" border="1" align="center">
|
||||||
<caption>
|
<caption>
|
||||||
Simple Arithmetic Operator Template Classes
|
Simple Arithmetic Operator Template Classes
|
||||||
@@ -2130,7 +2133,7 @@ public:
|
|||||||
<p>Revised: 7 Aug 2008</p>
|
<p>Revised: 7 Aug 2008</p>
|
||||||
|
|
||||||
<p>Copyright © Beman Dawes, David Abrahams, 1999-2001.</p>
|
<p>Copyright © Beman Dawes, David Abrahams, 1999-2001.</p>
|
||||||
<p>Copyright © Daniel Frey, 2002-2008.</p>
|
<p>Copyright © Daniel Frey, 2002-2009.</p>
|
||||||
<p>Use, modification, and distribution is subject to the Boost Software
|
<p>Use, modification, and distribution is subject to the Boost Software
|
||||||
License, Version 1.0. (See accompanying file
|
License, Version 1.0. (See accompanying file
|
||||||
<a href="../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or copy at
|
<a href="../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or copy at
|
||||||
|
@@ -70,7 +70,7 @@ struct ref_wrapper
|
|||||||
|
|
||||||
struct copy_counter {
|
struct copy_counter {
|
||||||
static int count_;
|
static int count_;
|
||||||
copy_counter(copy_counter const& other) {
|
copy_counter(copy_counter const& /*other*/) {
|
||||||
++count_;
|
++count_;
|
||||||
}
|
}
|
||||||
copy_counter() {}
|
copy_counter() {}
|
||||||
|
@@ -7,7 +7,11 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<!-- Page header -->
|
<!-- Page header -->
|
||||||
|
<h2>
|
||||||
<img src="../../boost.png" alt="C++ Boost" align="middle" width="277" height="86"/>
|
<img src="../../boost.png" alt="C++ Boost" align="middle" width="277" height="86"/>
|
||||||
|
Header <<a href="../../boost/swap.hpp">boost/swap.hpp</a>>
|
||||||
|
</h2>
|
||||||
|
|
||||||
<h1>Swap</h1>
|
<h1>Swap</h1>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
@@ -84,9 +88,9 @@
|
|||||||
|
|
||||||
<!-- Copyright info -->
|
<!-- Copyright info -->
|
||||||
<hr/>
|
<hr/>
|
||||||
<p>Revised: 15 November 2008</p>
|
<p>Revised: 08 September 2009</p>
|
||||||
<p>
|
<p>
|
||||||
Copyright 2007, 2008 Joseph Gauterin. Use, modification, and distribution are subject to the Boost Software License, Version 1.0.
|
Copyright 2007 - 2009 Joseph Gauterin. Use, modification, and distribution are subject to the Boost Software License, Version 1.0.
|
||||||
(See accompanying file <a href="../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or a copy at <<a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>>.)
|
(See accompanying file <a href="../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or a copy at <<a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>>.)
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
@@ -1,38 +0,0 @@
|
|||||||
boost_additional_test_dependencies(utility BOOST_DEPENDS test)
|
|
||||||
|
|
||||||
boost_test_run(addressof_test ../addressof_test.cpp)
|
|
||||||
boost_test_run(assert_test ../assert_test.cpp)
|
|
||||||
boost_test_run(base_from_member_test ../base_from_member_test.cpp)
|
|
||||||
boost_test_run(binary_search_test ../binary_search_test.cpp)
|
|
||||||
boost_test_run(call_traits_test ../call_traits_test.cpp ARGS -u)
|
|
||||||
boost_test_compile_fail(checked_delete_test ../checked_delete_test.cpp)
|
|
||||||
boost_test_run(compressed_pair_test
|
|
||||||
../compressed_pair_test
|
|
||||||
DEPENDS boost_test_exec_monitor)
|
|
||||||
boost_test_run(current_function_test ../current_function_test.cpp)
|
|
||||||
boost_test_run(iterators_test
|
|
||||||
../iterators_test.cpp
|
|
||||||
DEPENDS boost_test_exec_monitor)
|
|
||||||
boost_test_run(next_prior_test DEPENDS boost_test_exec_monitor)
|
|
||||||
boost_test_compile_fail(noncopyable_test ../noncopyable_test.cpp)
|
|
||||||
boost_test_run(numeric_traits_test ../numeric_traits_test.cpp)
|
|
||||||
if (${CMAKE_SYSTEM} MATCHES "FreeBSD-.*")
|
|
||||||
boost_test_compile_fail("operators_test_compilerbug")
|
|
||||||
elseif(${CMAKE_SYSTEM} MATCHES "FreeBSD-.*")
|
|
||||||
boost_test_run(operators_test
|
|
||||||
../operators_test.cpp
|
|
||||||
DEPENDS boost_test_exec_monitor)
|
|
||||||
endif(${CMAKE_SYSTEM} MATCHES "FreeBSD-.*")
|
|
||||||
boost_test_compile(ref_ct_test ../ref_ct_test.cpp)
|
|
||||||
boost_test_run(ref_test
|
|
||||||
../ref_test.cpp
|
|
||||||
DEPENDS boost_test_exec_monitor)
|
|
||||||
boost_test_compile(result_of_test)
|
|
||||||
boost_test_run(shared_iterator_test ../shared_iterator_test.cpp)
|
|
||||||
boost_test_run(value_init_test ../value_init_test.cpp)
|
|
||||||
boost_test_compile_fail(value_init_test_fail1
|
|
||||||
../value_init_test_fail1.cpp)
|
|
||||||
boost_test_compile_fail(value_init_test_fail2
|
|
||||||
../value_init_test_fail2.cpp)
|
|
||||||
boost_test_compile_fail(value_init_test_fail3
|
|
||||||
../value_init_test_fail3.cpp)
|
|
0
test/next_prior_test.cpp
Executable file → Normal file
0
test/next_prior_test.cpp
Executable file → Normal file
@@ -313,7 +313,7 @@ non-member function <code>get()</code>: </p>
|
|||||||
|
|
||||||
<h3>Warning:</h3>
|
<h3>Warning:</h3>
|
||||||
|
|
||||||
<p>The <code>value_initialized</code> implementation of Boost version 1.38.0 and older
|
<p>The <code>value_initialized</code> implementation of Boost version 1.40.0 and older
|
||||||
allowed <i>non-const</i> access to the wrapped object, from a constant wrapper,
|
allowed <i>non-const</i> access to the wrapped object, from a constant wrapper,
|
||||||
both by its conversion operator and its <code>data()</code> member function. For example:</p>
|
both by its conversion operator and its <code>data()</code> member function. For example:</p>
|
||||||
|
|
||||||
@@ -407,7 +407,7 @@ for Boost release version 1.35 (2008), offering a workaround to various compiler
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
<p>Revised 20 February 2009</p>
|
<p>Revised 03 October 2009</p>
|
||||||
|
|
||||||
<p>© Copyright Fernando Cacciola, 2002, 2009.</p>
|
<p>© Copyright Fernando Cacciola, 2002, 2009.</p>
|
||||||
|
|
||||||
|
@@ -29,9 +29,9 @@
|
|||||||
//
|
//
|
||||||
struct POD
|
struct POD
|
||||||
{
|
{
|
||||||
POD () : c(0), i(0), f(0) {}
|
POD () : f(0), c(0), i(0){}
|
||||||
|
|
||||||
POD ( char c_, int i_, float f_ ) : c(c_), i(i_), f(f_) {}
|
POD ( char c_, int i_, float f_ ) : f(f_), c(c_), i(i_) {}
|
||||||
|
|
||||||
friend std::ostream& operator << ( std::ostream& os, POD const& pod )
|
friend std::ostream& operator << ( std::ostream& os, POD const& pod )
|
||||||
{ return os << '(' << pod.c << ',' << pod.i << ',' << pod.f << ')' ; }
|
{ return os << '(' << pod.c << ',' << pod.i << ',' << pod.f << ')' ; }
|
||||||
@@ -291,7 +291,7 @@ int test_main(int, char **)
|
|||||||
{
|
{
|
||||||
BOOST_CHECK ( test( 0,1234 ) ) ;
|
BOOST_CHECK ( test( 0,1234 ) ) ;
|
||||||
BOOST_CHECK ( test( 0.0,12.34 ) ) ;
|
BOOST_CHECK ( test( 0.0,12.34 ) ) ;
|
||||||
BOOST_CHECK ( test( POD(0,0,0.0), POD('a',1234,56.78) ) ) ;
|
BOOST_CHECK ( test( POD(0,0,0.0), POD('a',1234,56.78f) ) ) ;
|
||||||
BOOST_CHECK ( test( NonPOD( std::string() ), NonPOD( std::string("something") ) ) ) ;
|
BOOST_CHECK ( test( NonPOD( std::string() ), NonPOD( std::string("something") ) ) ) ;
|
||||||
|
|
||||||
NonPOD NonPOD_object( std::string("NonPOD_object") );
|
NonPOD NonPOD_object( std::string("NonPOD_object") );
|
||||||
|
Reference in New Issue
Block a user