You can subscribe to this list here.
| 2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(89) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2006 |
Jan
(208) |
Feb
(76) |
Mar
(55) |
Apr
(74) |
May
(43) |
Jun
(116) |
Jul
(109) |
Aug
(46) |
Sep
(36) |
Oct
(106) |
Nov
(159) |
Dec
(128) |
| 2007 |
Jan
(54) |
Feb
(225) |
Mar
(200) |
Apr
(229) |
May
(7) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Daniel J. <dan...@us...> - 2007-03-18 22:37:29
|
Update of /cvsroot/boost-sandbox/boost-sandbox/libs/unordered/examples In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv32539/libs/unordered/examples Modified Files: case_insensitive.hpp case_insensitive_test.cpp Log Message: Import latest changes to the unordered containers. Includes: Copyright update. Switch back to the version where the sentinel points to itself. Remove alternative versions of swap. Workaround a borland bug or two. More consistent use of class/swap/template. Avoid a few warnings. Add a no-throw swap to the allocator for exception testing. Index: case_insensitive_test.cpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/unordered/examples/case_insensitive_test.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- case_insensitive_test.cpp 10 Jan 2007 00:08:41 -0000 1.1 +++ case_insensitive_test.cpp 18 Mar 2007 20:00:58 -0000 1.2 @@ -1,5 +1,5 @@ -// Copyright 2006 Daniel James. +// Copyright 2006-2007 Daniel James. // 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) Index: case_insensitive.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/unordered/examples/case_insensitive.hpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- case_insensitive.hpp 10 Jan 2007 00:08:41 -0000 1.1 +++ case_insensitive.hpp 18 Mar 2007 20:00:58 -0000 1.2 @@ -1,5 +1,5 @@ -// Copyright 2006 Daniel James. +// Copyright 2006-2007 Daniel James. // 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) |
Update of /cvsroot/boost-sandbox/boost-sandbox/libs/unordered/doc In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv32539/libs/unordered/doc Modified Files: buckets.qbk comparison.qbk hash_equality.qbk intro.qbk rationale.qbk ref.xml unordered.qbk Log Message: Import latest changes to the unordered containers. Includes: Copyright update. Switch back to the version where the sentinel points to itself. Remove alternative versions of swap. Workaround a borland bug or two. More consistent use of class/swap/template. Avoid a few warnings. Add a no-throw swap to the allocator for exception testing. Index: hash_equality.qbk =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/unordered/doc/hash_equality.qbk,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- hash_equality.qbk 10 Jan 2007 00:07:33 -0000 1.3 +++ hash_equality.qbk 18 Mar 2007 20:00:57 -0000 1.4 @@ -1,3 +1,7 @@ +[/ Copyright 2006-2007 Daniel James. + / 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) ] + [section:hash_equality Equality Predicates and Hash Functions] [/TODO: A better introduction to hash functions?] Index: ref.xml =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/unordered/doc/ref.xml,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- ref.xml 6 Aug 2006 20:44:47 -0000 1.5 +++ ref.xml 18 Mar 2007 20:00:57 -0000 1.6 @@ -1,3 +1,9 @@ +<!-- +Copyright Daniel James 2006-2007 +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) +--> + <library-reference> <!-- Header: <boost/unordered_set.hpp> Index: unordered.qbk =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/unordered/doc/unordered.qbk,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- unordered.qbk 6 Aug 2006 20:52:33 -0000 1.6 +++ unordered.qbk 18 Mar 2007 20:00:57 -0000 1.7 @@ -1,7 +1,11 @@ +[/ Copyright 2006-2007 Daniel James. + / 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) ] + [library Unordered Associative Containers [quickbook 1.3] [authors [Maitin-Shepard, Jeremy B.], [James, Daniel]] - [copyright 2005 2006 Daniel James] + [copyright 2005 2007 Daniel James] [purpose std::tr1 compliant hash containers] [id unordered] [dirname unordered] Index: comparison.qbk =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/unordered/doc/comparison.qbk,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- comparison.qbk 31 Oct 2006 22:15:47 -0000 1.6 +++ comparison.qbk 18 Mar 2007 20:00:57 -0000 1.7 @@ -1,3 +1,7 @@ +[/ Copyright 2006-2007 Daniel James. + / 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) ] + [section:comparison Comparison with Associative Containers] [table Interface differences. @@ -10,7 +14,10 @@ ] [ [`Compare` exposed by member typedef `key_compare`, accessed by member function `key_comp()`] - [`Hash` exposed by member typedef `hasher`, accessed by member function `hash_function()`.\n`Pred` by member typedef `key_equal` and member function `key_eq()`.] + [ + `Hash` exposed by member typedef `hasher`, accessed by member function `hash_function()`. + + `Pred` by member typedef `key_equal` and member function `key_eq()`.] ] [ [Member typedef `value_compare` supplies an ordering comparison for member elements, accessed by member function `value_comp()`.] Index: rationale.qbk =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/unordered/doc/rationale.qbk,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- rationale.qbk 31 Oct 2006 22:15:47 -0000 1.8 +++ rationale.qbk 18 Mar 2007 20:00:57 -0000 1.9 @@ -1,3 +1,7 @@ +[/ Copyright 2006-2007 Daniel James. + / 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) ] + [def __wang__ [@http://www.concentric.net/~Ttwang/tech/inthash.htm Thomas Wang's article on integer hash functions]] @@ -96,14 +100,11 @@ [h3 [@http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#431 431. Swapping containers with unequal allocators]] -In a fit of probably unwise enthusiasm, I implemented all the three versions -with a macro (BOOST_UNORDERED_SWAP_METHOD) to pick which one is used. As -suggested by Howard Hinnant, I set option 3 as the default. I'll probably -remove the alternative implementations before review. +I'm following Howard Hinnant's advice and implement option 3. There is currently a further issue - if the allocator's swap does throw there's no guarantee what state the allocators will be in. The only solution seems to -be to double buffer the allocators. +be to double buffer the allocators. But I'm assuming that it won't throw for now. [h3 [@http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#518 518. Are insert and erase stable for unordered_multiset and unordered_multimap?]] Index: buckets.qbk =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/unordered/doc/buckets.qbk,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- buckets.qbk 1 Jul 2006 22:33:29 -0000 1.4 +++ buckets.qbk 18 Mar 2007 20:00:57 -0000 1.5 @@ -1,3 +1,7 @@ +[/ Copyright 2006-2007 Daniel James. + / 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) ] + [section:buckets The Data Structure] The containers are made up of a number of 'buckets', each of which can contain @@ -6,7 +10,7 @@ `B`, `C`, `D` and `E` (this is just for illustration, in practise containers will have more buckets). -[$../diagrams/buckets.png] +[$../../libs/unordered/doc/diagrams/buckets.png] In order to decide which bucket to place an element in, the container applies `Hash` to the element's key (for `unordered_set` and `unordered_multiset` the Index: intro.qbk =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/unordered/doc/intro.qbk,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- intro.qbk 1 Jul 2006 22:33:29 -0000 1.6 +++ intro.qbk 18 Mar 2007 20:00:57 -0000 1.7 @@ -1,3 +1,7 @@ +[/ Copyright 2006-2007 Daniel James. + / 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) ] + [def __tr1__ [@http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2009.pdf C++ Standard Library Technical Report]] |
|
From: Daniel J. <dan...@us...> - 2007-03-18 22:37:28
|
Update of /cvsroot/boost-sandbox/boost-sandbox/libs/unordered/test/helpers In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv32539/libs/unordered/test/helpers Modified Files: check_return_type.hpp equivalent.hpp fwd.hpp generators.hpp helpers.hpp input_iterator.hpp invariants.hpp metafunctions.hpp random_values.hpp strong.hpp tracker.hpp Log Message: Import latest changes to the unordered containers. Includes: Copyright update. Switch back to the version where the sentinel points to itself. Remove alternative versions of swap. Workaround a borland bug or two. More consistent use of class/swap/template. Avoid a few warnings. Add a no-throw swap to the allocator for exception testing. Index: tracker.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/unordered/test/helpers/tracker.hpp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- tracker.hpp 31 Oct 2006 22:19:26 -0000 1.5 +++ tracker.hpp 18 Mar 2007 20:00:59 -0000 1.6 @@ -1,5 +1,5 @@ -// Copyright 2006 Daniel James. +// Copyright 2006-2007 Daniel James. // 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) Index: metafunctions.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/unordered/test/helpers/metafunctions.hpp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- metafunctions.hpp 1 Jul 2006 22:31:26 -0000 1.5 +++ metafunctions.hpp 18 Mar 2007 20:00:58 -0000 1.6 @@ -1,5 +1,5 @@ -// Copyright 2005-2006 Daniel James. +// Copyright 2005-2007 Daniel James. // 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) Index: fwd.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/unordered/test/helpers/fwd.hpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- fwd.hpp 1 Jul 2006 22:31:26 -0000 1.4 +++ fwd.hpp 18 Mar 2007 20:00:58 -0000 1.5 @@ -1,5 +1,5 @@ -// Copyright 2006 Daniel James. +// Copyright 2006-2007 Daniel James. // 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) Index: invariants.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/unordered/test/helpers/invariants.hpp,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- invariants.hpp 31 Oct 2006 22:19:26 -0000 1.6 +++ invariants.hpp 18 Mar 2007 20:00:58 -0000 1.7 @@ -1,5 +1,5 @@ -// Copyright 2006 Daniel James. +// Copyright 2006-2007 Daniel James. // 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) Index: strong.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/unordered/test/helpers/strong.hpp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- strong.hpp 31 Oct 2006 22:19:26 -0000 1.5 +++ strong.hpp 18 Mar 2007 20:00:59 -0000 1.6 @@ -1,5 +1,5 @@ -// Copyright 2005-2006 Daniel James. +// Copyright 2005-2007 Daniel James. // 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) Index: random_values.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/unordered/test/helpers/random_values.hpp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- random_values.hpp 31 Oct 2006 22:19:26 -0000 1.5 +++ random_values.hpp 18 Mar 2007 20:00:59 -0000 1.6 @@ -1,5 +1,5 @@ -// Copyright 2005-2006 Daniel James. +// Copyright 2005-2007 Daniel James. // 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) Index: generators.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/unordered/test/helpers/generators.hpp,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- generators.hpp 31 Oct 2006 22:19:26 -0000 1.7 +++ generators.hpp 18 Mar 2007 20:00:58 -0000 1.8 @@ -1,5 +1,5 @@ -// Copyright 2005-2006 Daniel James. +// Copyright 2005-2007 Daniel James. // 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) Index: equivalent.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/unordered/test/helpers/equivalent.hpp,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- equivalent.hpp 1 Jul 2006 22:31:26 -0000 1.8 +++ equivalent.hpp 18 Mar 2007 20:00:58 -0000 1.9 @@ -1,5 +1,5 @@ -// Copyright 2005-2006 Daniel James. +// Copyright 2005-2007 Daniel James. // 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) Index: input_iterator.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/unordered/test/helpers/input_iterator.hpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- input_iterator.hpp 31 Oct 2006 22:19:26 -0000 1.2 +++ input_iterator.hpp 18 Mar 2007 20:00:58 -0000 1.3 @@ -1,5 +1,5 @@ -// Copyright 2005-2006 Daniel James. +// Copyright 2005-2007 Daniel James. // 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) Index: helpers.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/unordered/test/helpers/helpers.hpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- helpers.hpp 6 Aug 2006 20:42:45 -0000 1.4 +++ helpers.hpp 18 Mar 2007 20:00:58 -0000 1.5 @@ -1,5 +1,5 @@ -// Copyright 2006 Daniel James. +// Copyright 2006-2007 Daniel James. // 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) Index: check_return_type.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/unordered/test/helpers/check_return_type.hpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- check_return_type.hpp 1 Jul 2006 22:31:26 -0000 1.2 +++ check_return_type.hpp 18 Mar 2007 20:00:58 -0000 1.3 @@ -1,5 +1,5 @@ -// Copyright 2005-2006 Daniel James. +// Copyright 2005-2007 Daniel James. // 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) |
|
From: Daniel J. <dan...@us...> - 2007-03-18 22:37:25
|
Update of /cvsroot/boost-sandbox/boost-sandbox/libs/unordered/doc/src_code In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv32539/libs/unordered/doc/src_code Modified Files: insensitive.cpp Log Message: Import latest changes to the unordered containers. Includes: Copyright update. Switch back to the version where the sentinel points to itself. Remove alternative versions of swap. Workaround a borland bug or two. More consistent use of class/swap/template. Avoid a few warnings. Add a no-throw swap to the allocator for exception testing. Index: insensitive.cpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/unordered/doc/src_code/insensitive.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- insensitive.cpp 10 Jan 2007 00:07:33 -0000 1.1 +++ insensitive.cpp 18 Mar 2007 20:00:57 -0000 1.2 @@ -1,5 +1,5 @@ -// Copyright 2006 Daniel James. +// Copyright 2006-2007 Daniel James. // 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) |
|
From: Daniel J. <dan...@us...> - 2007-03-18 22:37:23
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv32539/boost Modified Files: unordered_map.hpp unordered_set.hpp Log Message: Import latest changes to the unordered containers. Includes: Copyright update. Switch back to the version where the sentinel points to itself. Remove alternative versions of swap. Workaround a borland bug or two. More consistent use of class/swap/template. Avoid a few warnings. Add a no-throw swap to the allocator for exception testing. Index: unordered_map.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/unordered_map.hpp,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- unordered_map.hpp 10 Jan 2007 00:03:26 -0000 1.11 +++ unordered_map.hpp 18 Mar 2007 20:00:57 -0000 1.12 @@ -1,6 +1,6 @@ // Copyright (C) 2003-2004 Jeremy B. Maitin-Shepard. -// Copyright (C) 2005-2006 Daniel James. +// Copyright (C) 2005-2007 Daniel James. // 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) Index: unordered_set.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/unordered_set.hpp,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- unordered_set.hpp 10 Jan 2007 00:03:26 -0000 1.11 +++ unordered_set.hpp 18 Mar 2007 20:00:57 -0000 1.12 @@ -1,6 +1,6 @@ // Copyright (C) 2003-2004 Jeremy B. Maitin-Shepard. -// Copyright (C) 2005-2006 Daniel James. +// Copyright (C) 2005-2007 Daniel James. // 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) |
Update of /cvsroot/boost-sandbox/boost-sandbox/libs/unordered/test/container In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv32539/libs/unordered/test/container Modified Files: compile_tests.hpp link_test_1.cpp link_test_2.cpp map_compile.cpp set_compile.cpp simple_tests.cpp Log Message: Import latest changes to the unordered containers. Includes: Copyright update. Switch back to the version where the sentinel points to itself. Remove alternative versions of swap. Workaround a borland bug or two. More consistent use of class/swap/template. Avoid a few warnings. Add a no-throw swap to the allocator for exception testing. Index: compile_tests.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/unordered/test/container/compile_tests.hpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- compile_tests.hpp 31 Oct 2006 22:19:26 -0000 1.4 +++ compile_tests.hpp 18 Mar 2007 20:00:58 -0000 1.5 @@ -1,5 +1,5 @@ -// Copyright 2005-2006 Daniel James. +// Copyright 2005-2007 Daniel James. // 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) Index: set_compile.cpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/unordered/test/container/set_compile.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- set_compile.cpp 1 Jul 2006 22:31:25 -0000 1.2 +++ set_compile.cpp 18 Mar 2007 20:00:58 -0000 1.3 @@ -1,5 +1,5 @@ -// Copyright 2006 Daniel James. +// Copyright 2006-2007 Daniel James. // 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) Index: link_test_2.cpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/unordered/test/container/link_test_2.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- link_test_2.cpp 1 Jul 2006 22:31:25 -0000 1.2 +++ link_test_2.cpp 18 Mar 2007 20:00:58 -0000 1.3 @@ -1,5 +1,5 @@ -// Copyright 2006 Daniel James. +// Copyright 2006-2007 Daniel James. // 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) Index: map_compile.cpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/unordered/test/container/map_compile.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- map_compile.cpp 1 Jul 2006 22:31:25 -0000 1.2 +++ map_compile.cpp 18 Mar 2007 20:00:58 -0000 1.3 @@ -1,5 +1,5 @@ -// Copyright 2006 Daniel James. +// Copyright 2006-2007 Daniel James. // 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) Index: simple_tests.cpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/unordered/test/container/simple_tests.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- simple_tests.cpp 31 Oct 2006 22:19:26 -0000 1.4 +++ simple_tests.cpp 18 Mar 2007 20:00:58 -0000 1.5 @@ -1,5 +1,5 @@ -// Copyright 2006 Daniel James. +// Copyright 2006-2007 Daniel James. // 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) Index: link_test_1.cpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/unordered/test/container/link_test_1.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- link_test_1.cpp 1 Jul 2006 22:31:25 -0000 1.3 +++ link_test_1.cpp 18 Mar 2007 20:00:58 -0000 1.4 @@ -1,5 +1,5 @@ -// Copyright 2006 Daniel James. +// Copyright 2006-2007 Daniel James. // 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) |
Update of /cvsroot/boost-sandbox/boost-sandbox/libs/unordered/test/unordered In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv32539/libs/unordered/test/unordered Modified Files: Jamfile.v2 assign_tests.cpp bucket_tests.cpp compile_tests.cpp constructor_tests.cpp copy_tests.cpp equivalent_keys_tests.cpp erase_equiv_tests.cpp erase_tests.cpp find_tests.cpp insert_tests.cpp load_factor_tests.cpp rehash_tests.cpp swap_tests.cpp unnecessary_copy_tests.cpp Log Message: Import latest changes to the unordered containers. Includes: Copyright update. Switch back to the version where the sentinel points to itself. Remove alternative versions of swap. Workaround a borland bug or two. More consistent use of class/swap/template. Avoid a few warnings. Add a no-throw swap to the allocator for exception testing. Index: find_tests.cpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/unordered/test/unordered/find_tests.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- find_tests.cpp 1 Jul 2006 22:31:26 -0000 1.3 +++ find_tests.cpp 18 Mar 2007 20:00:59 -0000 1.4 @@ -1,5 +1,5 @@ -// Copyright 2006 Daniel James. +// Copyright 2006-2007 Daniel James. // 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) Index: insert_tests.cpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/unordered/test/unordered/insert_tests.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- insert_tests.cpp 31 Oct 2006 22:19:26 -0000 1.6 +++ insert_tests.cpp 18 Mar 2007 20:00:59 -0000 1.7 @@ -1,5 +1,5 @@ -// Copyright 2006 Daniel James. +// Copyright 2006-2007 Daniel James. // 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) Index: compile_tests.cpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/unordered/test/unordered/compile_tests.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- compile_tests.cpp 1 Jul 2006 22:31:26 -0000 1.4 +++ compile_tests.cpp 18 Mar 2007 20:00:59 -0000 1.5 @@ -1,5 +1,5 @@ -// Copyright 2006 Daniel James. +// Copyright 2006-2007 Daniel James. // 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) @@ -18,7 +18,7 @@ template <class T> void sink(T const&) {} template <class X, class Key> -void unordered_set_test(X& r, Key const& k) +void unordered_set_test(X&, Key const&) { typedef typename X::value_type value_type; typedef typename X::key_type key_type; @@ -27,7 +27,7 @@ } template <class X, class Key, class T> -void unordered_map_test(X& r, Key const& k, T const& t) +void unordered_map_test(X&, Key const&, T const&) { typedef typename X::value_type value_type; typedef typename X::key_type key_type; @@ -49,7 +49,7 @@ } template <class X, class Key, class T, class Hash, class Pred> -void unordered_test(X& ref, Key& k, T& t, Hash& hf, Pred& eq) +void unordered_test(X&, Key& k, T& t, Hash& hf, Pred& eq) { typedef typename X::key_type key_type; typedef typename X::hasher hasher; Index: swap_tests.cpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/unordered/test/unordered/swap_tests.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- swap_tests.cpp 3 Dec 2006 23:08:17 -0000 1.4 +++ swap_tests.cpp 18 Mar 2007 20:00:59 -0000 1.5 @@ -1,5 +1,5 @@ -// Copyright 2006 Daniel James. +// Copyright 2006-2007 Daniel James. // 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) Index: equivalent_keys_tests.cpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/unordered/test/unordered/equivalent_keys_tests.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- equivalent_keys_tests.cpp 1 Jul 2006 22:31:26 -0000 1.2 +++ equivalent_keys_tests.cpp 18 Mar 2007 20:00:59 -0000 1.3 @@ -1,5 +1,5 @@ -// Copyright 2006 Daniel James. +// Copyright 2006-2007 Daniel James. // 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) Index: assign_tests.cpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/unordered/test/unordered/assign_tests.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- assign_tests.cpp 31 Oct 2006 22:19:26 -0000 1.5 +++ assign_tests.cpp 18 Mar 2007 20:00:59 -0000 1.6 @@ -1,5 +1,5 @@ -// Copyright 2006 Daniel James. +// Copyright 2006-2007 Daniel James. // 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) Index: bucket_tests.cpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/unordered/test/unordered/bucket_tests.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- bucket_tests.cpp 1 Jul 2006 22:31:26 -0000 1.3 +++ bucket_tests.cpp 18 Mar 2007 20:00:59 -0000 1.4 @@ -1,5 +1,5 @@ -// Copyright 2006 Daniel James. +// Copyright 2006-2007 Daniel James. // 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) Index: constructor_tests.cpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/unordered/test/unordered/constructor_tests.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- constructor_tests.cpp 31 Oct 2006 22:19:26 -0000 1.6 +++ constructor_tests.cpp 18 Mar 2007 20:00:59 -0000 1.7 @@ -1,5 +1,5 @@ -// Copyright 2006 Daniel James. +// Copyright 2006-2007 Daniel James. // 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) Index: erase_equiv_tests.cpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/unordered/test/unordered/erase_equiv_tests.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- erase_equiv_tests.cpp 31 Oct 2006 22:19:26 -0000 1.1 +++ erase_equiv_tests.cpp 18 Mar 2007 20:00:59 -0000 1.2 @@ -1,5 +1,5 @@ -// Copyright 2006 Daniel James. +// Copyright 2006-2007 Daniel James. // 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) Index: rehash_tests.cpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/unordered/test/unordered/rehash_tests.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- rehash_tests.cpp 1 Jul 2006 22:31:26 -0000 1.3 +++ rehash_tests.cpp 18 Mar 2007 20:00:59 -0000 1.4 @@ -1,5 +1,5 @@ -// Copyright 2006 Daniel James. +// Copyright 2006-2007 Daniel James. // 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) Index: Jamfile.v2 =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/unordered/test/unordered/Jamfile.v2,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- Jamfile.v2 3 Dec 2006 23:08:17 -0000 1.5 +++ Jamfile.v2 18 Mar 2007 20:00:59 -0000 1.6 @@ -1,5 +1,5 @@ -# Copyright 2006 Daniel James. +# Copyright 2006-2007 Daniel James. # 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) @@ -25,7 +25,5 @@ [ run bucket_tests.cpp ] [ run load_factor_tests.cpp ] [ run rehash_tests.cpp ] - [ run swap_tests.cpp : : : <define>BOOST_UNORDERED_SWAP_METHOD=1 : swap_tests1 ] - [ run swap_tests.cpp : : : <define>BOOST_UNORDERED_SWAP_METHOD=2 : swap_tests2 ] - [ run swap_tests.cpp : : : <define>BOOST_UNORDERED_SWAP_METHOD=3 : swap_tests3 ] + [ run swap_tests.cpp : : : <define>BOOST_UNORDERED_SWAP_METHOD=3 ] ; Index: load_factor_tests.cpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/unordered/test/unordered/load_factor_tests.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- load_factor_tests.cpp 1 Jul 2006 22:31:26 -0000 1.3 +++ load_factor_tests.cpp 18 Mar 2007 20:00:59 -0000 1.4 @@ -1,5 +1,5 @@ -// Copyright 2006 Daniel James. +// Copyright 2006-2007 Daniel James. // 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) Index: copy_tests.cpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/unordered/test/unordered/copy_tests.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- copy_tests.cpp 31 Oct 2006 22:19:26 -0000 1.4 +++ copy_tests.cpp 18 Mar 2007 20:00:59 -0000 1.5 @@ -1,5 +1,5 @@ -// Copyright 2006 Daniel James. +// Copyright 2006-2007 Daniel James. // 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) Index: erase_tests.cpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/unordered/test/unordered/erase_tests.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- erase_tests.cpp 31 Oct 2006 22:19:26 -0000 1.5 +++ erase_tests.cpp 18 Mar 2007 20:00:59 -0000 1.6 @@ -1,5 +1,5 @@ -// Copyright 2006 Daniel James. +// Copyright 2006-2007 Daniel James. // 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) Index: unnecessary_copy_tests.cpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/unordered/test/unordered/unnecessary_copy_tests.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- unnecessary_copy_tests.cpp 3 Dec 2006 23:08:17 -0000 1.1 +++ unnecessary_copy_tests.cpp 18 Mar 2007 20:00:59 -0000 1.2 @@ -1,5 +1,5 @@ -// Copyright 2006 Daniel James. +// Copyright 2006-2007 Daniel James. // 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) |
|
From: Daniel J. <dan...@us...> - 2007-03-18 22:37:13
|
Update of /cvsroot/boost-sandbox/boost-sandbox/libs/unordered/test/exception In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv32539/libs/unordered/test/exception Modified Files: Jamfile.v2 assign_tests.cpp constructor_tests.cpp containers.hpp copy_tests.cpp erase_tests.cpp insert_tests.cpp rehash_tests.cpp swap_tests.cpp Log Message: Import latest changes to the unordered containers. Includes: Copyright update. Switch back to the version where the sentinel points to itself. Remove alternative versions of swap. Workaround a borland bug or two. More consistent use of class/swap/template. Avoid a few warnings. Add a no-throw swap to the allocator for exception testing. Index: containers.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/unordered/test/exception/containers.hpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- containers.hpp 1 Jul 2006 22:31:26 -0000 1.3 +++ containers.hpp 18 Mar 2007 20:00:58 -0000 1.4 @@ -1,5 +1,5 @@ -// Copyright 2006 Daniel James. +// Copyright 2006-2007 Daniel James. // 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) Index: insert_tests.cpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/unordered/test/exception/insert_tests.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- insert_tests.cpp 6 Aug 2006 20:42:45 -0000 1.3 +++ insert_tests.cpp 18 Mar 2007 20:00:58 -0000 1.4 @@ -1,5 +1,5 @@ -// Copyright 2006 Daniel James. +// Copyright 2006-2007 Daniel James. // 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) Index: swap_tests.cpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/unordered/test/exception/swap_tests.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- swap_tests.cpp 10 Jan 2007 00:06:55 -0000 1.4 +++ swap_tests.cpp 18 Mar 2007 20:00:58 -0000 1.5 @@ -1,5 +1,5 @@ -// Copyright 2006 Daniel James. +// Copyright 2006-2007 Daniel James. // 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) Index: assign_tests.cpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/unordered/test/exception/assign_tests.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- assign_tests.cpp 1 Jul 2006 22:31:26 -0000 1.2 +++ assign_tests.cpp 18 Mar 2007 20:00:58 -0000 1.3 @@ -1,5 +1,5 @@ -// Copyright 2006 Daniel James. +// Copyright 2006-2007 Daniel James. // 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) Index: constructor_tests.cpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/unordered/test/exception/constructor_tests.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- constructor_tests.cpp 6 Aug 2006 20:42:45 -0000 1.3 +++ constructor_tests.cpp 18 Mar 2007 20:00:58 -0000 1.4 @@ -1,5 +1,5 @@ -// Copyright 2006 Daniel James. +// Copyright 2006-2007 Daniel James. // 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) Index: rehash_tests.cpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/unordered/test/exception/rehash_tests.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- rehash_tests.cpp 31 Oct 2006 22:19:26 -0000 1.4 +++ rehash_tests.cpp 18 Mar 2007 20:00:58 -0000 1.5 @@ -1,5 +1,5 @@ -// Copyright 2006 Daniel James. +// Copyright 2006-2007 Daniel James. // 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) Index: Jamfile.v2 =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/unordered/test/exception/Jamfile.v2,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- Jamfile.v2 3 Dec 2006 23:08:17 -0000 1.3 +++ Jamfile.v2 18 Mar 2007 20:00:58 -0000 1.4 @@ -1,5 +1,5 @@ -# Copyright 2006 Daniel James. +# Copyright 2006-2007 Daniel James. # 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) @@ -22,9 +22,5 @@ [ run erase_tests.cpp framework ] [ run rehash_tests.cpp framework ] [ run swap_tests.cpp framework : : : - <define>BOOST_UNORDERED_SWAP_METHOD=1 : swap_tests1 ] - [ run swap_tests.cpp framework : : : - <define>BOOST_UNORDERED_SWAP_METHOD=2 : swap_tests2 ] - [ run swap_tests.cpp framework : : : - <define>BOOST_UNORDERED_SWAP_METHOD=3 : swap_tests3 ] + <define>BOOST_UNORDERED_SWAP_METHOD=3 ] ; Index: copy_tests.cpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/unordered/test/exception/copy_tests.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- copy_tests.cpp 1 Jul 2006 22:31:26 -0000 1.2 +++ copy_tests.cpp 18 Mar 2007 20:00:58 -0000 1.3 @@ -1,5 +1,5 @@ -// Copyright 2006 Daniel James. +// Copyright 2006-2007 Daniel James. // 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) Index: erase_tests.cpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/unordered/test/exception/erase_tests.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- erase_tests.cpp 3 Dec 2006 23:08:17 -0000 1.5 +++ erase_tests.cpp 18 Mar 2007 20:00:58 -0000 1.6 @@ -1,5 +1,5 @@ -// Copyright 2006 Daniel James. +// Copyright 2006-2007 Daniel James. // 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) |
|
From: Daniel J. <dan...@us...> - 2007-03-18 22:37:10
|
Update of /cvsroot/boost-sandbox/boost-sandbox/libs/unordered/test In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv32539/libs/unordered/test Modified Files: Jamfile.v2 Log Message: Import latest changes to the unordered containers. Includes: Copyright update. Switch back to the version where the sentinel points to itself. Remove alternative versions of swap. Workaround a borland bug or two. More consistent use of class/swap/template. Avoid a few warnings. Add a no-throw swap to the allocator for exception testing. Index: Jamfile.v2 =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/unordered/test/Jamfile.v2,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- Jamfile.v2 1 Jul 2006 22:31:25 -0000 1.5 +++ Jamfile.v2 18 Mar 2007 20:00:58 -0000 1.6 @@ -1,5 +1,5 @@ -# Copyright 2006 Daniel James. +# Copyright 2006-2007 Daniel James. # 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) |
|
From: Daniel J. <dan...@us...> - 2007-03-18 22:37:09
|
Update of /cvsroot/boost-sandbox/boost-sandbox/libs/unordered/test/objects In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv32539/libs/unordered/test/objects Modified Files: exception.hpp fwd.hpp minimal.hpp test.hpp Log Message: Import latest changes to the unordered containers. Includes: Copyright update. Switch back to the version where the sentinel points to itself. Remove alternative versions of swap. Workaround a borland bug or two. More consistent use of class/swap/template. Avoid a few warnings. Add a no-throw swap to the allocator for exception testing. Index: exception.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/unordered/test/objects/exception.hpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- exception.hpp 3 Dec 2006 23:08:17 -0000 1.4 +++ exception.hpp 18 Mar 2007 20:00:59 -0000 1.5 @@ -1,5 +1,5 @@ -// Copyright 2006 Daniel James. +// Copyright 2006-2007 Daniel James. // 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) @@ -661,6 +661,11 @@ } return (std::numeric_limits<std::size_t>::max)(); } + + friend void swap(allocator<T>& x, allocator<T>& y) + { + std::swap(x.tag_, y.tag_); + } }; // It's pretty much impossible to write a compliant swap when these Index: fwd.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/unordered/test/objects/fwd.hpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- fwd.hpp 1 Jul 2006 22:31:26 -0000 1.3 +++ fwd.hpp 18 Mar 2007 20:00:59 -0000 1.4 @@ -1,5 +1,5 @@ -// Copyright 2006 Daniel James. +// Copyright 2006-2007 Daniel James. // 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) Index: minimal.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/unordered/test/objects/minimal.hpp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- minimal.hpp 31 Oct 2006 22:19:26 -0000 1.5 +++ minimal.hpp 18 Mar 2007 20:00:59 -0000 1.6 @@ -1,5 +1,5 @@ -// Copyright 2006 Daniel James. +// Copyright 2006-2007 Daniel James. // 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) @@ -46,7 +46,7 @@ class hash { public: - static hash create() { return hash(); } + static hash create() { return hash<T>(); } hash() {} hash(hash const&) {} hash& operator=(hash const&) { return *this; } @@ -59,13 +59,13 @@ class equal_to { public: - static equal_to create() { return equal_to(); } + static equal_to create() { return equal_to<T>(); } equal_to() {} equal_to(equal_to const&) {} equal_to& operator=(equal_to const&) { return *this; } ~equal_to() {} - bool operator()(T const& x, T const& y) const { return true; } + bool operator()(T const&, T const&) const { return true; } }; template <class T> class pointer; @@ -90,7 +90,7 @@ T* operator->() const { return ptr_; } pointer& operator++() { ++ptr_; return *this; } pointer operator++(int) { pointer tmp(*this); ++ptr_; return tmp; } - pointer operator+(int s) const { return pointer(ptr_ + s); } + pointer operator+(int s) const { return pointer<T>(ptr_ + s); } T& operator[](int s) const { return ptr_[s]; } bool operator!() const { return !ptr_; } Index: test.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/unordered/test/objects/test.hpp,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- test.hpp 3 Dec 2006 23:08:17 -0000 1.8 +++ test.hpp 18 Mar 2007 20:00:59 -0000 1.9 @@ -1,5 +1,5 @@ -// Copyright 2006 Daniel James. +// Copyright 2006-2007 Daniel James. // 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) |
|
From: Daniel J. <dan...@us...> - 2007-03-18 22:37:08
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost/unordered/detail In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv32539/boost/unordered/detail Modified Files: allocator.hpp hash_table.hpp hash_table_impl.hpp Log Message: Import latest changes to the unordered containers. Includes: Copyright update. Switch back to the version where the sentinel points to itself. Remove alternative versions of swap. Workaround a borland bug or two. More consistent use of class/swap/template. Avoid a few warnings. Add a no-throw swap to the allocator for exception testing. Index: hash_table_impl.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/unordered/detail/hash_table_impl.hpp,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- hash_table_impl.hpp 25 Feb 2007 21:09:38 -0000 1.11 +++ hash_table_impl.hpp 18 Mar 2007 20:00:57 -0000 1.12 @@ -1,6 +1,6 @@ // Copyright (C) 2003-2004 Jeremy B. Maitin-Shepard. -// Copyright (C) 2005-2006 Daniel James +// Copyright (C) 2005-2007 Daniel James // 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) @@ -28,13 +28,13 @@ // // Responsible for managing the hash buckets. [...1144 lines suppressed...] - template <class Alloc> + template <typename Alloc> class HASH_ITERATOR : public boost::iterator < std::forward_iterator_tag, @@ -2044,7 +2006,7 @@ bool operator!=(const_iterator const& x) const { return base_ != x.base_; } }; - template <class Alloc> + template <typename Alloc> class HASH_CONST_ITERATOR : public boost::iterator < std::forward_iterator_tag, @@ -2088,5 +2050,3 @@ #undef HASH_LOCAL_ITERATOR #undef HASH_CONST_LOCAL_ITERATOR - - Index: allocator.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/unordered/detail/allocator.hpp,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- allocator.hpp 31 Oct 2006 22:11:25 -0000 1.6 +++ allocator.hpp 18 Mar 2007 20:00:57 -0000 1.7 @@ -1,5 +1,5 @@ -// Copyright 2005 Daniel James. +// Copyright 2005-2007 Daniel James. // 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) Index: hash_table.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/unordered/detail/hash_table.hpp,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- hash_table.hpp 1 Jul 2006 22:34:48 -0000 1.11 +++ hash_table.hpp 18 Mar 2007 20:00:57 -0000 1.12 @@ -1,6 +1,6 @@ // Copyright (C) 2003-2004 Jeremy B. Maitin-Shepard. -// Copyright (C) 2005-2006 Daniel James +// Copyright (C) 2005-2007 Daniel James // 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) @@ -33,15 +33,6 @@ #include <boost/mpl/aux_/config/eti.hpp> -// See hash_table::swap() for details about this. -#if !defined(BOOST_UNORDERED_SWAP_METHOD) -#define BOOST_UNORDERED_SWAP_METHOD 3 -#endif - -#if BOOST_UNORDERED_SWAP_METHOD == 1 -#include <stdexcept> -#endif - #if BOOST_WORKAROUND(__BORLANDC__, <= 0x0551) #define BOOST_HASH_BORLAND_BOOL(x) (bool)(x) #else |
|
From: Karl M. <kar...@us...> - 2007-03-18 13:11:54
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost/numeric/bindings/traits In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv32068 Modified Files: ublas_matrix.hpp Log Message: bug in ublas::matrix bindings Index: ublas_matrix.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/numeric/bindings/traits/ublas_matrix.hpp,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- ublas_matrix.hpp 3 Dec 2006 15:25:43 -0000 1.16 +++ ublas_matrix.hpp 18 Mar 2007 13:11:10 -0000 1.17 @@ -75,7 +75,7 @@ static int leading_dimension (matrix_type& m) { // g++ 2.95.4 and 3.0.4 (with -pedantic) dislike // identifier_type::functor_type::size2() - return functor_t::size_M (m.size1(), m.size2()); + return functor_t::size_m (m.size1(), m.size2()); } // stride1 == distance (m (i, j), m (i+1, j)) |
|
From: Paul A B. <pbr...@us...> - 2007-03-16 15:16:21
|
Update of /cvsroot/boost-sandbox/boost-sandbox/libs/math_functions/test In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv30841/boost-sandbox/libs/math_functions/test Modified Files: Tag: math_toolkit test_lognormal.cpp Log Message: added tests (possibly not quite right) for ranges. Index: test_lognormal.cpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/math_functions/test/Attic/test_lognormal.cpp,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.4 diff -u -d -r1.1.2.3 -r1.1.2.4 --- test_lognormal.cpp 20 Dec 2006 15:33:43 -0000 1.1.2.3 +++ test_lognormal.cpp 16 Mar 2007 15:16:00 -0000 1.1.2.4 @@ -242,6 +242,10 @@ kurtosis_excess(dist) , static_cast<RealType>(4312295840576300.2363383232038251L), tolerance); + BOOST_CHECK_CLOSE( + range(dist).first + , static_cast<RealType>(0), tolerance); + // // Special cases: // @@ -270,6 +274,14 @@ boost::math::lognormal myf1(1., 2); // Using typedef lognormal_distribution<> myf2(1., 2); // Using default RealType double. + // Test range and support using double only, + // because it supports numeric_limits max for a pseudo-infinity. + BOOST_CHECK_EQUAL(range(myf2).first, 0); // range 0 to +infinity + BOOST_CHECK_EQUAL(range(myf2).second, numeric_limits<double>::max()); + BOOST_CHECK_EQUAL(support(myf2).first, 0); // support 0 to + infinity. + BOOST_CHECK_EQUAL(support(myf2).second, numeric_limits<double>::max()); + + // Basic sanity-check spot values. // (Parameter value, arbitrarily zero, only communicates the floating point type). test_spots(0.0F); // Test float. OK at decdigits = 0 tolerance = 0.0001 % |
|
From: Paul A B. <pbr...@us...> - 2007-03-16 15:01:32
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost/math/distributions In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv22337/boost-sandbox/boost/math/distributions Modified Files: Tag: math_toolkit normal.hpp students_t.hpp uniform.hpp Log Message: cosmetic updates Index: uniform.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/math/distributions/Attic/uniform.hpp,v retrieving revision 1.1.2.10 retrieving revision 1.1.2.11 diff -u -d -r1.1.2.10 -r1.1.2.11 --- uniform.hpp 14 Feb 2007 10:15:26 -0000 1.1.2.10 +++ uniform.hpp 16 Mar 2007 14:55:12 -0000 1.1.2.11 @@ -158,7 +158,7 @@ RealType lower = dist.lower(); RealType upper = dist.upper(); RealType result; // of checks. - if(false == detail::check_uniform(BOOST_CURRENT_FUNCTION,lower, upper, &result)) + if(false == detail::check_uniform(BOOST_CURRENT_FUNCTION, lower, upper, &result)) { return result; } Index: normal.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/math/distributions/Attic/normal.hpp,v retrieving revision 1.1.2.10 retrieving revision 1.1.2.11 diff -u -d -r1.1.2.10 -r1.1.2.11 --- normal.hpp 29 Dec 2006 18:27:26 -0000 1.1.2.10 +++ normal.hpp 16 Mar 2007 14:55:12 -0000 1.1.2.11 @@ -30,12 +30,12 @@ : m_mean(mean), m_sd(sd) {} RealType mean()const - { + { // location return m_mean; } RealType standard_deviation()const - { + { // scale return m_sd; } private: @@ -63,8 +63,6 @@ return std::pair<RealType, RealType>(-max_value<RealType>(), max_value<RealType>()); // - to + infinity. } - - template <class RealType> RealType pdf(const normal_distribution<RealType>& dist, const RealType& x) { @@ -95,7 +93,6 @@ RealType result; result = boost::math::erfc(-diff) / 2; - return result; } @@ -111,7 +108,6 @@ r = boost::math::erfc_inv(2 * p); r = -r; - r *= sd * constants::root_two<RealType>(); r += mean; @@ -145,12 +141,9 @@ RealType q = c.param; RealType r; - r = boost::math::erfc_inv(2 * q); - r *= sd * constants::root_two<RealType>(); r += mean; - return r; } @@ -204,5 +197,5 @@ // keep compilers that support two-phase lookup happy. #include <boost/math/distributions/detail/derived_accessors.hpp> -#endif // BOOST_STATS_STUDENTS_T_HPP +#endif // BOOST_STATS_NORMAL_HPP Index: students_t.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/math/distributions/Attic/students_t.hpp,v retrieving revision 1.1.2.23 retrieving revision 1.1.2.24 diff -u -d -r1.1.2.23 -r1.1.2.24 --- students_t.hpp 19 Jan 2007 17:05:15 -0000 1.1.2.23 +++ students_t.hpp 16 Mar 2007 14:55:12 -0000 1.1.2.24 @@ -30,10 +30,10 @@ typedef RealType value_type; students_t_distribution(RealType i) : m_df(i) - { + { // Constructor. RealType result; detail::check_df( - BOOST_CURRENT_FUNCTION, m_df, &result); + BOOST_CURRENT_FUNCTION, m_df, &result); } // students_t_distribution RealType degrees_of_freedom()const |
|
From: Paul A B. <pbr...@us...> - 2007-03-16 15:01:30
|
Update of /cvsroot/boost-sandbox/boost-sandbox/libs/math_functions/test In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv23388/boost-sandbox/libs/math_functions/test Added Files: Tag: math_toolkit test_pareto.cpp Log Message: 1st try. --- NEW FILE: test_pareto.cpp --- // Copyright Paul A. Bristow 2006. // Copyright John Maddock 2006. // Use, modification and distribution are 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) // test_pareto.cpp // http://en.wikipedia.org/wiki/pareto_distribution // http://www.itl.nist.gov/div898/handbook/eda/section3/eda3661.htm // Also: // Weisstein, Eric W. "pareto Distribution." // From MathWorld--A Wolfram Web Resource. // http://mathworld.wolfram.com/paretoDistribution.html #define BOOST_MATH_THROW_ON_DOMAIN_ERROR #define BOOST_MATH_THROW_ON_OVERFLOW #ifdef _MSC_VER # pragma warning(disable: 4127) // conditional expression is constant. # pragma warning(disable: 4100) // unreferenced formal parameter. # pragma warning(disable: 4512) // assignment operator could not be generated. # pragma warning(disable: 4510) // default constructor could not be generated. # pragma warning(disable: 4610) // can never be instantiated - user defined constructor required. # if !(defined _SCL_SECURE_NO_DEPRECATE) || (_SCL_SECURE_NO_DEPRECATE == 0) # pragma warning(disable: 4996) // 'std::char_traits<char>::copy' was declared deprecated. // #define _SCL_SECURE_NO_DEPRECATE = 1 // avoid C4996 warning. # endif //# pragma warning(disable: 4244) // conversion from 'double' to 'float', possible loss of data. #endif #include <boost/math/concepts/real_concept.hpp> // for real_concept #include <boost/test/included/test_exec_monitor.hpp> // Boost.Test #include <boost/test/floating_point_comparison.hpp> #include <boost/math/distributions/pareto.hpp> using boost::math::pareto_distribution; #include <boost/math/tools/test.hpp> #include <iostream> using std::cout; using std::endl; using std::setprecision; #include <limits> using std::numeric_limits; template <class RealType> void check_pareto(RealType location, RealType shape, RealType x, RealType p, RealType q, RealType tol) { BOOST_CHECK_CLOSE_FRACTION( ::boost::math::cdf( pareto_distribution<RealType>(location, shape), // distribution. x), // random variable. p, // probability. tol); // tolerance eps. BOOST_CHECK_CLOSE_FRACTION( ::boost::math::cdf( complement( pareto_distribution<RealType>(location, shape), // distribution. x)), // random variable. q, // probability complement. tol); // tolerance eps. BOOST_CHECK_CLOSE_FRACTION( ::boost::math::quantile( pareto_distribution<RealType>(location, shape), // distribution. p), // probability. x, // random variable. tol); // tolerance eps. BOOST_CHECK_CLOSE_FRACTION( ::boost::math::quantile( complement( pareto_distribution<RealType>(location, shape), // distribution. q)), // probability complement. x, // random variable. tol); // tolerance eps. } // check_pareto template <class RealType> void test_spots(RealType T) { // Basic sanity checks //RealType tolerance = static_cast<RealType>(std::pow(10., -(4))); // 1e-4 (as fraction, NOT %) //cout << "tolerance for type " << typeid(T).name() << " is " << tolerance << "." << endl; // Not used so far: use epsilon tolerances. RealType tol5eps = boost::math::tools::epsilon<RealType>() * 5; RealType tol10eps = boost::math::tools::epsilon<RealType>() * 10; RealType tol100eps = boost::math::tools::epsilon<RealType>() * 100; RealType tol1000eps = boost::math::tools::epsilon<RealType>() * 1000; check_pareto( static_cast<RealType>(1.1), // static_cast<RealType>(5.5), static_cast<RealType>(2.2), static_cast<RealType>(0.97790291308792), static_cast<RealType>(0.0220970869120796), tol10eps * 4); check_pareto( static_cast<RealType>(0.5), static_cast<RealType>(10.1), static_cast<RealType>(1.5), static_cast<RealType>(0.99998482686481), static_cast<RealType>(1.51731351900608e-005), tol100eps * 1000); // Much less accurate as p close to unity. check_pareto( static_cast<RealType>(0.1), static_cast<RealType>(2.3), static_cast<RealType>(1.5), static_cast<RealType>(0.99802762220697), static_cast<RealType>(0.00197237779302972), tol1000eps); // Example from 23.3 page 259 check_pareto( static_cast<RealType>(2.30444301457005), static_cast<RealType>(4), static_cast<RealType>(2.4), static_cast<RealType>(0.15), static_cast<RealType>(0.85), tol100eps); check_pareto( static_cast<RealType>(2), static_cast<RealType>(3), static_cast<RealType>(3.4), static_cast<RealType>(0.796458375737838), static_cast<RealType>(0.203541624262162), tol10eps); check_pareto( // Probability near 0.5 static_cast<RealType>(2), static_cast<RealType>(2), static_cast<RealType>(3), static_cast<RealType>(0.5555555555555555555555555555555555555556), static_cast<RealType>(0.4444444444444444444444444444444444444444), tol5eps); // accurate. // Tests for: // pdf for shapes 1, 2 & 3 (exact) BOOST_CHECK_CLOSE_FRACTION( pdf(pareto_distribution<RealType>(1, 1), 1), static_cast<RealType>(1), // tol5eps); BOOST_CHECK_CLOSE_FRACTION( pdf(pareto_distribution<RealType>(1, 2), 1), static_cast<RealType>(2), // tol5eps); BOOST_CHECK_CLOSE_FRACTION( pdf(pareto_distribution<RealType>(1, 3), 1), static_cast<RealType>(3), // tol5eps); // cdf BOOST_CHECK_EQUAL( // x = location cdf(pareto_distribution<RealType>(1, 1), 1), static_cast<RealType>(0) ); // Compare with values from StatCalc K. Krishnamoorthy, ISBN 1-58488-635-8 eq 23.1.3 BOOST_CHECK_CLOSE_FRACTION( // small x cdf(pareto_distribution<RealType>(2, 5), static_cast<RealType>(3.4)), static_cast<RealType>(0.929570372227626), tol5eps); BOOST_CHECK_CLOSE_FRACTION( // small x cdf(pareto_distribution<RealType>(2, 5), static_cast<RealType>(3.4)), static_cast<RealType>(1 - 0.0704296277723743), tol5eps); BOOST_CHECK_CLOSE_FRACTION( // small x cdf(complement(pareto_distribution<RealType>(2, 5), static_cast<RealType>(3.4))), static_cast<RealType>(0.0704296277723743), tol5eps); // quantile BOOST_CHECK_EQUAL( // x = location quantile(pareto_distribution<RealType>(1, 1), 0), static_cast<RealType>(1) ); BOOST_CHECK_EQUAL( // x = location quantile(complement(pareto_distribution<RealType>(1, 1), 1)), static_cast<RealType>(1) ); BOOST_CHECK_CLOSE_FRACTION( // small x cdf(complement(pareto_distribution<RealType>(2, 5), static_cast<RealType>(3.4))), static_cast<RealType>(0.0704296277723743), tol5eps); RealType tol2eps = boost::math::tools::epsilon<RealType>() * 2; using namespace std; // ADL of std names. pareto_distribution<RealType> pareto15(1, 5); // Note: shape must be big enough (5) that all moments up to kurtosis are defined // to allow all functions to be tested. // mean: BOOST_CHECK_CLOSE_FRACTION( mean(pareto15), static_cast<RealType>(1.25), tol2eps); // 1.25 == 5/4 BOOST_CHECK_EQUAL( mean(pareto15), static_cast<RealType>(1.25)); // 1.25 == 5/4 (expect exact so check equal) pareto_distribution<RealType> p12(1, 2); // BOOST_CHECK_EQUAL( mean(p12), static_cast<RealType>(2)); // Exactly two. // variance: BOOST_CHECK_CLOSE_FRACTION( variance(pareto15), static_cast<RealType>(0.10416666666666667), tol2eps); // std deviation: BOOST_CHECK_CLOSE_FRACTION( standard_deviation(pareto15), static_cast<RealType>(0.32274861218395140), tol2eps); // hazard: No independent test values found yet. //BOOST_CHECK_CLOSE_FRACTION( // hazard(pareto15, x), pdf(pareto15, x) / cdf(complement(pareto15, x)), tol2eps); //// cumulative hazard: //BOOST_CHECK_CLOSE_FRACTION( // chf(pareto15, x), -log(cdf(complement(pareto15, x))), tol2eps); //// coefficient_of_variation: BOOST_CHECK_CLOSE_FRACTION( coefficient_of_variation(pareto15), static_cast<RealType>(0.25819888974716110), tol2eps); // mode: BOOST_CHECK_CLOSE_FRACTION( mode(pareto15), static_cast<RealType>(1), tol2eps); BOOST_CHECK_CLOSE_FRACTION( median(pareto15), static_cast<RealType>(1.1486983549970351), tol2eps); // skewness: BOOST_CHECK_CLOSE_FRACTION( skewness(pareto15), static_cast<RealType>(4.6475800154489004), tol2eps); // kertosis: BOOST_CHECK_CLOSE_FRACTION( kurtosis(pareto15), static_cast<RealType>(73.8), tol2eps); // kertosis excess: BOOST_CHECK_CLOSE_FRACTION( kurtosis_excess(pareto15), static_cast<RealType>(70.8), tol2eps); // Check difference between kurtosis and excess: BOOST_CHECK_CLOSE_FRACTION( kurtosis_excess(pareto15), kurtosis(pareto15) - static_cast<RealType>(3L), tol5eps); // Check kurtosis excess = kurtosis - 3; } // template <class RealType>void test_spots(RealType) int test_main(int, char* []) { // Check that can generate pareto distribution using the two convenience methods: boost::math::pareto myp1(1., 1); // Using typedef pareto_distribution<> myp2(1., 1); // Using default RealType double. boost::math::pareto pareto11; // Use default values (location = 1, shape = 1). // Note NOT pareto11() as the compiler will interpret as a function! // Basic sanity-check spot values. BOOST_CHECK_EQUAL(pareto11.location(), 1); // Check defaults again. BOOST_CHECK_EQUAL(pareto11.shape(), 1); BOOST_CHECK_EQUAL(myp1.location(), 1); BOOST_CHECK_EQUAL(myp1.shape(), 1); BOOST_CHECK_EQUAL(myp2.location(), 1); BOOST_CHECK_EQUAL(myp2.shape(), 1); // Test range and support using double only, // because it supports numeric_limits max for pseudo-infinity. BOOST_CHECK_EQUAL(range(myp2).first, 0); // range 0 to +infinity BOOST_CHECK_EQUAL(range(myp2).second, numeric_limits<double>::max()); BOOST_CHECK_EQUAL(support(myp2).first, myp2.location()); // support location to + infinity. BOOST_CHECK_EQUAL(support(myp2).second, numeric_limits<double>::max()); // Check some bad parameters to the distribution. BOOST_CHECK_THROW(boost::math::pareto mypm1(-1, 1), std::domain_error); // Using typedef BOOST_CHECK_THROW(boost::math::pareto myp0(0, 1), std::domain_error); // Using typedef BOOST_CHECK_THROW(boost::math::pareto myp1m1(1, -1), std::domain_error); // Using typedef BOOST_CHECK_THROW(boost::math::pareto myp10(1, 0), std::domain_error); // Using typedef // Check some moments that should fail because shape not big enough. BOOST_CHECK_THROW(variance(myp2), std::domain_error); BOOST_CHECK_THROW(standard_deviation(myp2), std::domain_error); BOOST_CHECK_THROW(skewness(myp2), std::domain_error); BOOST_CHECK_THROW(kurtosis(myp2), std::domain_error); BOOST_CHECK_THROW(kurtosis_excess(myp2), std::domain_error); // Test on extreme values of distribution parameters, // using just double because it has numeric_limit infinity etc. BOOST_CHECK_THROW(boost::math::pareto mypinf1(+std::numeric_limits<double>::infinity(), 1), std::domain_error); // Using typedef BOOST_CHECK_THROW(boost::math::pareto myp1inf(1, +std::numeric_limits<double>::infinity()), std::domain_error); // Using typedef BOOST_CHECK_THROW(boost::math::pareto mypinf1(+std::numeric_limits<double>::infinity(), +std::numeric_limits<double>::infinity()), std::domain_error); // Using typedef // Test on extreme values of random variate x, using just double because it has numeric_limit infinity etc.. // No longer allow x to be + or - infinity, then these tests should throw. BOOST_CHECK_THROW(pdf(pareto11, +std::numeric_limits<double>::infinity()), std::domain_error); // x = + infinity BOOST_CHECK_THROW(pdf(pareto11, -std::numeric_limits<double>::infinity()), std::domain_error); // x = - infinity BOOST_CHECK_THROW(cdf(pareto11, +std::numeric_limits<double>::infinity()), std::domain_error); // x = + infinity BOOST_CHECK_THROW(cdf(pareto11, -std::numeric_limits<double>::infinity()), std::domain_error); // x = - infinity BOOST_CHECK_EQUAL(pdf(pareto11, 0.5), 0); // x < location but > 0 BOOST_CHECK_EQUAL(pdf(pareto11, (std::numeric_limits<double>::min)()), 0); // x almost zero but > 0 BOOST_CHECK_EQUAL(pdf(pareto11, 1), 1); // x == location, result == shape == 1 BOOST_CHECK_EQUAL(pdf(pareto11, +(std::numeric_limits<double>::max)()), 0); // x = +max, pdf has fallen to zero. BOOST_CHECK_THROW(pdf(pareto11, 0), std::domain_error); // x == 0 BOOST_CHECK_THROW(pdf(pareto11, -1), std::domain_error); // x = -1 BOOST_CHECK_THROW(pdf(pareto11, -(std::numeric_limits<double>::max)()), std::domain_error); // x = - max BOOST_CHECK_THROW(pdf(pareto11, -(std::numeric_limits<double>::min)()), std::domain_error); // x = - min BOOST_CHECK_EQUAL(cdf(pareto11, 1), 0); // x == location, cdf = zero. BOOST_CHECK_EQUAL(cdf(pareto11, +(std::numeric_limits<double>::max)()), 1); // x = + max, cdf = unity. BOOST_CHECK_THROW(cdf(pareto11, 0), std::domain_error); // x == 0 BOOST_CHECK_THROW(cdf(pareto11, -(std::numeric_limits<double>::min)()), std::domain_error); // x = - min, BOOST_CHECK_THROW(cdf(pareto11, -(std::numeric_limits<double>::max)()), std::domain_error); // x = - max, // (Parameter value, arbitrarily zero, only communicates the floating point type). test_spots(0.0F); // Test float. OK at decdigits = 0 tol5eps = 0.0001 % test_spots(0.0); // Test double. OK at decdigits 7, tol5eps = 1e07 % #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS test_spots(0.0L); // Test long double. #if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x0582)) test_spots(boost::math::concepts::real_concept(0.)); // Test real concept. #endif #else std::cout << "<note>The long double tests have been disabled on this platform " "either because the long double overloads of the usual math functions are " "not available at all, or because they are too inaccurate for these tests " "to pass.</note>" << std::cout; #endif return 0; } // int test_main(int, char* []) /* Output: */ |
|
From: Paul A B. <pbr...@us...> - 2007-03-16 15:01:16
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost/math/distributions In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv21438/boost-sandbox/boost/math/distributions Added Files: Tag: math_toolkit pareto.hpp Log Message: 1st try --- NEW FILE: pareto.hpp --- // Copyright John Maddock 2007. // Copyright Paul A. Bristow 2007 // Use, modification and distribution are 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) #ifndef BOOST_STATS_PARETO_HPP #define BOOST_STATS_PARETO_HPP // http://en.wikipedia.org/wiki/Pareto_distribution // http://www.itl.nist.gov/div898/handbook/eda/section3/eda3661.htm // Also: // Weisstein, Eric W. "Pareto Distribution." // From MathWorld--A Wolfram Web Resource. // http://mathworld.wolfram.com/ParetoDistribution.html #include <boost/math/distributions/complement.hpp> #include <boost/math/distributions/detail/common_error_handling.hpp> #include <boost/math/special_functions/powm1.hpp> #include <utility> // for BOOST_CURRENT_VALUE? namespace boost { namespace math { namespace detail { // Parameter checking. template <class RealType> bool check_pareto_location( const char* function, RealType location, RealType* result) { if((boost::math::isfinite)(location)) { // any > 0 finite value is OK. if (location > 0) { return true; } else { *result = tools::domain_error<RealType>( function, "Location parameter is %1%, but must be > 0!", location); return false; } } else { // Not finite. *result = tools::domain_error<RealType>( function, "Location parameter is %1%, but must be finite!", location); return false; } } // bool check_pareto_location template <class RealType> bool check_pareto_shape( const char* function, RealType shape, RealType* result) { if((boost::math::isfinite)(shape)) { // Any finite value is OK. if (shape > 0) { return true; } else { *result = tools::domain_error<RealType>( function, "Shape parameter is %1%, but must be > 0!", shape); return false; } } else { // Not finite. *result = tools::domain_error<RealType>( function, "Shape parameter is %1%, but must be finite!", shape); return false; } } // bool check_pareto_shape( template <class RealType> bool check_pareto_x( const char* function, RealType const& x, RealType* result) { if((boost::math::isfinite)(x)) { // if (x > 0) { return true; } else { *result = tools::domain_error<RealType>( function, "x parameter is %1%, but must be > 0 !", x); return false; } } else { // Not finite.. *result = tools::domain_error<RealType>( function, "x parameter is %1%, but must be finite!", x); return false; } } // bool check_pareto_x template <class RealType> inline bool check_pareto( // distribution parameters. const char* function, RealType location, RealType shape, RealType* result) { if(check_pareto_location(function, location, result) && check_pareto_shape(function, shape, result) ) { return true; } else { return false; } } // bool check_pareto( } // namespace detail template <class RealType = double> class pareto_distribution { public: typedef RealType value_type; pareto_distribution(RealType location = 1, RealType shape = 1) : m_location(location), m_shape(shape) { // Constructor. RealType result; detail::check_pareto(BOOST_CURRENT_FUNCTION, location, shape, &result); } RealType location()const { // AKA Xm and b return m_location; } RealType shape()const { // AKA k and a return m_shape; } private: // Data members: RealType m_location; // distribution location (xm) RealType m_shape; // distribution shape (k) }; typedef pareto_distribution<double> pareto; // Convenience to allow pareto(2., 3.); template <class RealType> const std::pair<RealType, RealType> range(const pareto_distribution<RealType>& dist) { // Range of permissible values for random variable x. using boost::math::tools::max_value; return std::pair<RealType, RealType>(0, max_value<RealType>()); // location zero to + infinity. } // range template <class RealType> const std::pair<RealType, RealType> support(const pareto_distribution<RealType>& dist) { // Range of supported values for random variable x. // This is range where cdf rises from 0 to 1, and outside it, the pdf is zero. using boost::math::tools::max_value; return std::pair<RealType, RealType>(dist.location(), max_value<RealType>() ); // location to + infinity. } // support template <class RealType> RealType pdf(const pareto_distribution<RealType>& dist, const RealType& x) { using namespace std; // for ADL of std function pow. RealType location = dist.location(); RealType result; detail::check_pareto_x(BOOST_CURRENT_FUNCTION, x, &result); if (x < location) { // regardless of shape, pdf is zero. return 0; } RealType shape = dist.shape(); result = shape * pow(location, shape) / pow(x, shape+1); return result; } // pdf template <class RealType> RealType cdf(const pareto_distribution<RealType>& dist, const RealType& x) { using namespace std; // for ADL of std function pow. RealType location = dist.location(); RealType result; detail::check_pareto_x(BOOST_CURRENT_FUNCTION, x, &result); if (x <= location) { // regardless of shape, cdf is zero. return 0; } RealType shape = dist.shape(); // result = RealType(1) - pow((location / x), shape); result = -powm1(location/x, shape); // should be more accurate. return result; } // cdf template <class RealType> RealType quantile(const pareto_distribution<RealType>& dist, const RealType& p) { using namespace std; // for ADL of std function pow. RealType result; if(false == detail::check_probability(BOOST_CURRENT_FUNCTION, p, &result)) { return result; } RealType location = dist.location(); if (p == 0) { return location; // x must be location (or less). } if (p == 1) { return tools::max_value<RealType>(); // x = + infinity. } RealType shape = dist.shape(); result = location / (pow((1 - p), 1 / shape)); // K. Krishnamoorthy, ISBN 1-58488-635-8 eq 23.1.3 return result; } // quantile template <class RealType> RealType cdf(const complemented2_type<pareto_distribution<RealType>, RealType>& c) { using namespace std; // for ADL of std function pow. RealType result; RealType x = c.param; if(false == detail::check_pareto_x(BOOST_CURRENT_FUNCTION, x, &result)) { return result; } RealType location = c.dist.location(); if (x <= location) { // regardless of shape, cdf is zero, and complement is unity. return 1; } RealType shape = c.dist.shape(); result = pow((location/x), shape); return result; } // cdf complement template <class RealType> RealType quantile(const complemented2_type<pareto_distribution<RealType>, RealType>& c) { using namespace std; // for ADL of std function pow. RealType result; RealType q = c.param; if(false == detail::check_probability(BOOST_CURRENT_FUNCTION, q, &result)) { return result; } RealType location = c.dist.location(); if (q == 1) { return location; // x must be location (or less). } if (q == 0) { return tools::max_value<RealType>(); // x = + infinity. } RealType shape = c.dist.shape(); result = location / (pow(q, 1 / shape)); // K. Krishnamoorthy, ISBN 1-58488-635-8 eq 23.1.3 return result; } // quantile complement template <class RealType> inline RealType mean(const pareto_distribution<RealType>& dist) { if (dist.shape() > RealType(1)) { return dist.shape() * dist.location() / (dist.shape() - 1); } else { using boost::math::tools::max_value; return max_value<RealType>(); // +infinity. } } // mean template <class RealType> inline RealType mode(const pareto_distribution<RealType>& dist) { return dist.location(); } // mode template <class RealType> inline RealType median(const pareto_distribution<RealType>& dist) { return dist.location() * pow(2, (1/dist.shape())); } // median template <class RealType> inline RealType variance(const pareto_distribution<RealType>& dist) { RealType result; RealType location = dist.location(); RealType shape = dist.shape(); if (shape > 2) { result = (location * location * shape) / ((shape - 1) * (shape - 1) * (shape - 2)); } else { result = tools::domain_error<RealType>( BOOST_CURRENT_FUNCTION, "variance is undefined for shape <= 2, but got %1%.", dist.shape()); } return result; } // variance template <class RealType> inline RealType skewness(const pareto_distribution<RealType>& dist) { RealType result; RealType shape = dist.shape(); if (shape > 3) { result = sqrt((shape - 2) / shape) * 2 * (shape + 1) / (shape - 3); } else { result = tools::domain_error<RealType>( BOOST_CURRENT_FUNCTION, "skewness is undefined for shape <= 3, but got %1%.", dist.shape()); } return result; } // skewness template <class RealType> inline RealType kurtosis(const pareto_distribution<RealType>& dist) { RealType result; RealType shape = dist.shape(); if (shape > 4) { result = 3 * ((shape - 2) * (3 * shape * shape + shape + 2)) / (shape * (shape - 3) * (shape - 4)); } else { result = tools::domain_error<RealType>( BOOST_CURRENT_FUNCTION, "kurtosis_excess is undefined for shape <= 4, but got %1%.", shape); } return result; } // kurtosis template <class RealType> inline RealType kurtosis_excess(const pareto_distribution<RealType>& dist) { RealType result; RealType shape = dist.shape(); if (shape > 4) { result = 6 * ((shape * shape * shape) + (shape * shape) - 6 * shape - 2) / (shape * (shape - 3) * (shape - 4)); } else { result = tools::domain_error<RealType>( BOOST_CURRENT_FUNCTION, "kurtosis_excess is undefined for shape <= 4, but got %1%.", dist.shape()); } return result; } // kurtosis_excess } // namespace math } // namespace boost // This include must be at the end, *after* the accessors // for this distribution have been defined, in order to // keep compilers that support two-phase lookup happy. #include <boost/math/distributions/detail/derived_accessors.hpp> #endif // BOOST_STATS_PARETO_HPP |
|
From: Frank M. H. <fm...@us...> - 2007-03-13 17:38:38
|
Update of /cvsroot/boost-sandbox/boost-sandbox/libs/thread_safe_signals/test In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv2071 Modified Files: signal_n_test.cpp signal_test.cpp track_test.cpp Log Message: We can't explicitly track signals, except in the normal way with shared_ptr. Index: signal_test.cpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/thread_safe_signals/test/signal_test.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- signal_test.cpp 2 Mar 2007 22:04:47 -0000 1.3 +++ signal_test.cpp 13 Mar 2007 17:38:37 -0000 1.4 @@ -147,7 +147,7 @@ { signal_type s2; - s1.connect(signal_type::slot_type(s2).track(s2)); + s1.connect(signal_type::slot_type(s2)); s2.connect(std::bind1st(std::multiplies<int>(), 2)); s2.connect(std::bind1st(std::multiplies<int>(), -3)); Index: signal_n_test.cpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/thread_safe_signals/test/signal_n_test.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- signal_n_test.cpp 2 Mar 2007 22:04:46 -0000 1.3 +++ signal_n_test.cpp 13 Mar 2007 17:38:37 -0000 1.4 @@ -149,7 +149,7 @@ { signal_type s2; - s1.connect(signal_type::slot_type(s2).track(s2)); + s1.connect(signal_type::slot_type(s2)); s2.connect(std::bind1st(std::multiplies<int>(), 2)); s2.connect(std::bind1st(std::multiplies<int>(), -3)); Index: track_test.cpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/thread_safe_signals/test/track_test.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- track_test.cpp 5 Mar 2007 14:51:26 -0000 1.7 +++ track_test.cpp 13 Mar 2007 17:38:37 -0000 1.8 @@ -87,7 +87,7 @@ // Test binding of a signal as a slot { sig_type s2; - s1.connect(sig_type::slot_type(s2).track(s2)); + s1.connect(sig_type::slot_type(s2)); s2.connect(sig_type::slot_type(&myfunc, _1, 0.7)); BOOST_CHECK(s1(4) == 4); } |
|
From: Frank M. H. <fm...@us...> - 2007-03-13 17:22:09
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv28091 Modified Files: thread_safe_signal.hpp Log Message: Fixed compilation errors when signals/slot.hpp is included by itself. Index: thread_safe_signal.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/thread_safe_signal.hpp,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- thread_safe_signal.hpp 6 Mar 2007 18:17:30 -0000 1.18 +++ thread_safe_signal.hpp 13 Mar 2007 17:22:07 -0000 1.19 @@ -24,10 +24,6 @@ #ifndef _THREAD_SAFE_SIGNAL_HPP #define _THREAD_SAFE_SIGNAL_HPP -#ifndef BOOST_SIGNALS_MAX_ARGS -#define BOOST_SIGNALS_MAX_ARGS 10 -#endif - #define BOOST_SIGNALS_NAMESPACE signalslib #include <algorithm> |
|
From: Frank M. H. <fm...@us...> - 2007-03-13 17:22:09
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost/thread_safe_signals/detail In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv28091/thread_safe_signals/detail Modified Files: signals_common_macros.hpp Log Message: Fixed compilation errors when signals/slot.hpp is included by itself. Index: signals_common_macros.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/thread_safe_signals/detail/signals_common_macros.hpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- signals_common_macros.hpp 28 Feb 2007 15:54:22 -0000 1.2 +++ signals_common_macros.hpp 13 Mar 2007 17:22:08 -0000 1.3 @@ -23,6 +23,10 @@ #ifndef BOOST_SIGNALS_COMMON_MACROS_HEADER #define BOOST_SIGNALS_COMMON_MACROS_HEADER +#ifndef BOOST_SIGNALS_MAX_ARGS +#define BOOST_SIGNALS_MAX_ARGS 10 +#endif + // argn #define BOOST_SIGNAL_SIGNATURE_ARG_NAME(z, n, data) BOOST_PP_CAT(arg, BOOST_PP_INC(n)) // Tn argn |
|
From: Frank M. H. <fm...@us...> - 2007-03-13 17:22:09
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost/thread_safe_signals In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv28091/thread_safe_signals Modified Files: slot.hpp Log Message: Fixed compilation errors when signals/slot.hpp is included by itself. Index: slot.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/thread_safe_signals/slot.hpp,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- slot.hpp 7 Mar 2007 14:42:14 -0000 1.16 +++ slot.hpp 13 Mar 2007 17:22:07 -0000 1.17 @@ -13,6 +13,7 @@ #define BOOST_TSS_SIGNALS_SLOT_HEADER #include <boost/bind.hpp> +#include <boost/function.hpp> #include <boost/mpl/bool.hpp> #include <boost/ref.hpp> #include <boost/thread_safe_signals/detail/signals_common.hpp> |
|
From: Frank M. H. <fm...@us...> - 2007-03-09 14:27:27
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost/thread_safe_signals/detail In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv4208/detail Modified Files: signal_template.hpp Log Message: Fixed some confusion over ConnectionBody template parameter. Index: signal_template.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/thread_safe_signals/detail/signal_template.hpp,v retrieving revision 1.44 retrieving revision 1.45 diff -u -d -r1.44 -r1.45 --- signal_template.hpp 6 Mar 2007 16:59:30 -0000 1.44 +++ signal_template.hpp 9 Mar 2007 14:27:22 -0000 1.45 @@ -75,7 +75,7 @@ typedef Group group_type; typedef GroupCompare group_compare_type; typedef typename signalslib::detail::slot_call_iterator_t<slot_invoker, - typename connection_list_type::iterator, ConnectionBody<group_key_type, SlotFunction, ThreadingModel> > slot_call_iterator; + typename connection_list_type::iterator, ConnectionBody<group_key_type, slot_type, ThreadingModel> > slot_call_iterator; BOOST_SIGNAL_IMPL_CLASS_NAME(const combiner_type &combiner, const group_compare_type &group_compare): @@ -298,7 +298,7 @@ { bool connected; { - typename ConnectionBody<group_key_type, SlotFunction, ThreadingModel>::mutex_type::scoped_lock lock((*it)->mutex); + typename ConnectionBody<group_key_type, slot_type, ThreadingModel>::mutex_type::scoped_lock lock((*it)->mutex); if(grab_tracked) (*it)->nolock_slot_expired(); connected = (*it)->nolock_nograb_connected(); @@ -365,7 +365,7 @@ for(it = local_state->connection_bodies.begin(); it != local_state->connection_bodies.end(); ++it) { - typename ConnectionBody<group_key_type, slot_function_type, ThreadingModel>::mutex_type::scoped_lock lock((*it)->mutex); + typename ConnectionBody<group_key_type, slot_type, ThreadingModel>::mutex_type::scoped_lock lock((*it)->mutex); if((*it)->slot.slot_function() == slot) { (*it)->nolock_disconnect(); |
|
From: Frank M. H. <fm...@us...> - 2007-03-07 17:06:28
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv16399 Modified Files: deconstruct_ptr.hpp Log Message: Declared some functions extern inline to fix link errors. Index: deconstruct_ptr.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/deconstruct_ptr.hpp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- deconstruct_ptr.hpp 6 Mar 2007 21:47:07 -0000 1.5 +++ deconstruct_ptr.hpp 7 Mar 2007 17:06:22 -0000 1.6 @@ -24,12 +24,12 @@ { namespace deconstruct_detail { - void do_postconstruct(const boost::postconstructible *ptr) + extern inline void do_postconstruct(const boost::postconstructible *ptr) { boost::postconstructible *nonconst_ptr = const_cast<boost::postconstructible*>(ptr); nonconst_ptr->postconstruct(); } - void do_postconstruct(...) + extern inline void do_postconstruct(...) { } } |
|
From: Frank M. H. <fm...@us...> - 2007-03-07 16:29:49
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost/thread_safe_signals In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv1369 Modified Files: connection.hpp Log Message: Declare null_deleter as extern inline. Index: connection.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/thread_safe_signals/connection.hpp,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- connection.hpp 7 Mar 2007 14:42:14 -0000 1.27 +++ connection.hpp 7 Mar 2007 16:29:35 -0000 1.28 @@ -39,7 +39,7 @@ { namespace signalslib { - void null_deleter(const void*) {} + extern inline void null_deleter(const void*) {} namespace detail { class ConnectionBodyBase |
|
From: Frank M. H. <fm...@us...> - 2007-03-07 14:42:29
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost/thread_safe_signals In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv15954 Modified Files: connection.hpp slot.hpp Removed Files: track.hpp Log Message: Removed obsolete header track.hpp --- track.hpp DELETED --- Index: connection.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/thread_safe_signals/connection.hpp,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- connection.hpp 6 Mar 2007 18:17:30 -0000 1.26 +++ connection.hpp 7 Mar 2007 14:42:14 -0000 1.27 @@ -26,7 +26,6 @@ #include <boost/noncopyable.hpp> #include <boost/shared_ptr.hpp> #include <boost/thread_safe_signals/slot.hpp> -#include <boost/thread_safe_signals/track.hpp> #include <boost/type_traits.hpp> #include <boost/visit_each.hpp> #include <boost/weak_ptr.hpp> Index: slot.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/thread_safe_signals/slot.hpp,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- slot.hpp 1 Mar 2007 15:57:25 -0000 1.15 +++ slot.hpp 7 Mar 2007 14:42:14 -0000 1.16 @@ -18,7 +18,6 @@ #include <boost/thread_safe_signals/detail/signals_common.hpp> #include <boost/thread_safe_signals/detail/signals_common_macros.hpp> #include <boost/thread_safe_signals/slot_base.hpp> -#include <boost/thread_safe_signals/track.hpp> #include <boost/type_traits.hpp> #include <boost/utility/addressof.hpp> #include <boost/weak_ptr.hpp> |
|
From: Frank M. H. <fm...@us...> - 2007-03-06 21:51:58
|
Update of /cvsroot/boost-sandbox/boost-sandbox/libs/thread_safe_signals/doc/reference In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv2126/reference Modified Files: connection.xml last_value.xml reference.xml signal_header.xml slot.xml track.xml visit_each.xml Added Files: auto_threaded.xml deconstruct_ptr.xml multi_threaded.xml postconstructible.xml predestructible.xml shared_connection_block.xml single_threaded.xml Log Message: Updated documentation. Index: slot.xml =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/thread_safe_signals/doc/reference/slot.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- slot.xml 5 Mar 2007 19:54:28 -0000 1.1 +++ slot.xml 6 Mar 2007 21:51:55 -0000 1.2 @@ -6,8 +6,6 @@ <using-namespace name="boost::signals"/> <using-class name="boost::signalN"/> <namespace name="boost"> - <class name="expired_slot"> - </class> <class name="slotN"> <template> <template-type-parameter name="R"/> @@ -172,7 +170,7 @@ <returns><simpara>The result returned by the slot's <code>SlotFunction</code> object.</simpara></returns> <throws><simpara>Any exceptions thrown by the slot's <code>SlotFunction</code> object. - <class>boost::expired_slot</class> if any object in the tracked object list + <classname>boost::expired_slot</classname> if any object in the tracked object list has expired.</simpara></throws> <notes><simpara>If you have already used <methodname>lock</methodname> to insure the @@ -197,15 +195,9 @@ <paramtype>const signals::detail::slot_base &</paramtype> </parameter> </signature> - <signature> - <type>slotN &</type> - <parameter name="tracked_signal"> - <paramtype>const signals::detail::signal_base &</paramtype> - </parameter> - </signature> <effects><para>Adds object(s) to the slot's tracked object list. Should any of the tracked objects expire, then subsequent attempts to call the slot's <code>operator()</code> - or <code>lock()</code> methods will throw an <class>expired_slot</class> exception.</para> + or <code>lock()</code> methods will throw an <classname>expired_slot</classname> exception.</para> <para>In the case of passing another slot as the argument to <code>track()</code>, only the objects in the other slot's tracked object list are added to the tracked object list of <code>this</code>. The other slot object itself @@ -222,7 +214,7 @@ <type>locked_container_type</type> <returns>A container holding <code>shared_ptr</code>s to each of the slot's tracked objects. As long as the returned container is kept in scope, none of the slot's tracked objects can expire.</returns> - <throws><class>expired_slot</class> if any of the slot's tracked objects have expired.</throws> + <throws><classname>expired_slot</classname> if any of the slot's tracked objects have expired.</throws> </method> <method name = "tracked_objects" cv="const"> <type>const tracked_container_type &</type> @@ -272,5 +264,21 @@ <constructor> </constructor> </class> + + <class name="expired_slot"> + <inherit access="public"><classname>bad_weak_ptr</classname></inherit> + <purpose>Indicates at least one of a slot's tracked objects has expired.</purpose> + <description>The <code>expired_slot</code> exception is thrown to indicate at least one of + a slot's tracked objects has expired. A <classname alt="signalN">signal</classname> + will automatically disconnect any slot which throws this exception during + signal invocation. Combiners + that wish to support disconnection via expired_slot exceptions should be + prepared to handle <code>expired_slot</code> exceptions thrown + by the slot iterator dereference operation. + </description> + <method name="what" cv="const" specifiers="virtual"> + <type>const char * </type> + </method> + </class> </namespace> </header> \ No newline at end of file Index: connection.xml =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/thread_safe_signals/doc/reference/connection.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- connection.xml 5 Mar 2007 19:54:28 -0000 1.1 +++ connection.xml 6 Mar 2007 21:51:55 -0000 1.2 @@ -25,7 +25,7 @@ </constructor> <constructor> - <parameter name="other"> + <parameter name="other"> <paramtype>const <classname>connection</classname>&</paramtype> </parameter> @@ -37,7 +37,7 @@ </constructor> <copy-assignment> - <parameter name="other"> + <parameter name="other"> <paramtype>const <classname>connection</classname>&</paramtype> </parameter> @@ -70,22 +70,6 @@ </method-group> <method-group name="blocking"> - <method name="block"> - <type>void</type> - <parameter name="should_block"> - <paramtype>bool</paramtype> - <default>true</default> - </parameter> - <requires><simpara><code>connected()</code></simpara></requires> - <postconditions><simpara><code>blocked() == should_block</code></simpara></postconditions> - <throws><simpara>Will not throw.</simpara></throws> - </method> - <method name="unblock"> - <type>void</type> - <requires><simpara><code>connected()</code></simpara></requires> - <postconditions><simpara><code>!blocked()</code></simpara></postconditions> - <throws><simpara>Will not throw.</simpara></throws> - </method> <method name="blocked" cv="const"> <type>bool</type> <returns><simpara><code>true</code> if the associated slot is either disconnected or blocked, <code>false</code> otherwise.</simpara></returns> @@ -102,9 +86,9 @@ <effects><para>Swaps the connections referenced in <computeroutput>this</computeroutput> and <computeroutput>other</computeroutput>.</para></effects> - + <throws><para>Will not throw.</para></throws> - </method> + </method> </method-group> <method-group name="comparisons"> @@ -160,6 +144,9 @@ </class> <class name="scoped_connection"> + <inherit access="public"> + <type><classname>connection</classname></type> + </inherit> <inherit access="private"> <type><classname>noncopyable</classname></type> <purpose>Exposition only</purpose> @@ -167,7 +154,7 @@ <purpose>Limits a signal-slot connection lifetime to a particular scope.</purpose> <constructor> - <parameter name="other"> + <parameter name="other"> <paramtype>const <classname>connection</classname>&</paramtype> </parameter> @@ -184,26 +171,7 @@ disconnects the signal-slot connection.</para></effects> </destructor> - <method-group name="connection management"> - <method name="disconnect" cv="const"> - <type>void</type> - <effects><para>If - <computeroutput>this-><methodname>connected</methodname>()</computeroutput>, - disconnects the signal and slot referenced by this; - otherwise, this operation is a no-op.</para></effects> - - <postconditions><para><computeroutput>!this-><methodname>connected</methodname>()</computeroutput>.</para></postconditions> - </method> - - <method name="connected" cv="const"> - <type>bool</type> - <returns><para><computeroutput>true</computeroutput> if this - references a non-NULL connection that is still active - (connected), and <computeroutput>false</computeroutput> - otherwise.</para></returns> - <throws><para>Will not throw.</para></throws> - </method> - </method-group> + <description><para>A connection which automatically disconnects on destruction.</para></description> </class> </namespace> </namespace> --- NEW FILE: multi_threaded.xml --- <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE header PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd"> <header name="boost/signals/multi_threaded.hpp" last-revision="$Date: 2007/03/06 21:51:55 $"> <using-namespace name="boost"/> <using-namespace name="boost::signals"/> <namespace name="boost"> <namespace name="signals"> <class name="multi_threaded"> <purpose>Thread-safety for a signal, using Boost.Threads.</purpose> <description> <para>The <code>multi_threaded</code> class will produce a thread-safe signal class when used as the signal's <code>ThreadingModel</code> template parameter. The <code>multi_threaded</code> class depends on the boost.threads library. If you include the boost/signals/multi_threaded.hpp header file, you will be required to link your code to the boost.threads binary library. Thus boost/signals/multi_threaded.hpp is not automatically included when you include boost/signal.hpp, and must be included separately if you wish to use <code>multi_threaded</code>. </para> </description> </class> </namespace> </namespace> </header> --- NEW FILE: deconstruct_ptr.xml --- <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE header PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd"> <header name="boost/deconstruct_ptr.hpp" last-revision="$Date: 2007/03/06 21:51:55 $"> <using-namespace name="boost"/> <namespace name="boost"> <overloaded-function name="deconstruct_ptr"> <signature> <template> <template-type-parameter name="T"/> </template> <type>shared_ptr<T></type> <parameter name="pointer"><paramtype>T*</paramtype></parameter> </signature> <signature> <template> <template-type-parameter name="T"/> <template-type-parameter name="D"/> </template> <type>shared_ptr<T></type> <parameter name="pointer"><paramtype>T*</paramtype></parameter> <parameter name="deleter"><paramtype>D</paramtype></parameter> </signature> <purpose>Create a <code>shared_ptr</code> which supports post-constructors and pre-destructors.</purpose> <effects><para>Creates a <code>shared_ptr<T></code> by passing the <code>pointer</code> and <code>deleter</code> parameters to the <code>shared_ptr</code> constructor. If no <code>deleter</code> is specified, then <classname>predestructing_deleter</classname> is used as the default. If <code>T</code> is derived from <classname>postconstructible</classname> (and <code>pointer</code> is not a null pointer), then <code>pointer->postconstruct()</code> will be called after the <code>shared_ptr</code> is constructed.</para> </effects> <returns><para>A <code>shared_ptr<T></code> owning <code>pointer</code>.</para></returns> </overloaded-function> <class name="predestructing_deleter"> <template> <template-type-parameter name="T"/> </template> <method name="operator()" cv="const"> <type>void</type> <parameter name="pointer"><paramtype>const T *</paramtype> </parameter> <effects><para>Calls <code>pointer-><methodname>predestruct</methodname>()</code> if <code>T</code> is derived from <classname>predestructible</classname>. Then <code>pointer</code> is deleted using <functionname>checked_delete</functionname>.</para></effects> </method> <purpose>Predestruct object if it is predestructible, then delete. </purpose> </class> </namespace> </header> --- NEW FILE: shared_connection_block.xml --- <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE header PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd"> <header name="boost/signals/shared_connection_block.hpp" last-revision="$Date: 2007/03/06 21:51:55 $"> <using-namespace name="boost"/> <using-namespace name="boost::signals"/> <using-class name="boost::signals::connection"/> <namespace name="boost"> <namespace name="signals"> <class name="shared_connection_block"> <purpose>Blocks a connection between a signal and a slot.</purpose> <description> <para>A <code>shared_connection_block</code> object blocks a connection, preventing the associated slot from executing when the associated signal is invoked. The connection will remain blocked until every <code>shared_connection_block</code> that references the connection releases its block. A <code>shared_connection_block</code> releases its block when it is destroyed or its <methodname>unblock</methodname> method is called.</para> <para>A <code>shared_connection_block</code> is safe to use even after the <classname>connection</classname> object it was constructed from has been destroyed, or the connection it references has been disconnected.</para> </description> <constructor> <parameter name="conn"> <paramtype>boost::signals::connection &</paramtype> </parameter> <effects> <para>Creates a <code>shared_connection_block</code> which references the connection referenced by <code>conn</code>. The connection will initially be blocked, and remain so until <methodname>unblock</methodname> is called, or the <code>shared_connection_block</code> is destroyed.</para> </effects> <postconditions><para><code>this->blocking() == true</code></para></postconditions> </constructor> <destructor> <effects><para>If <methodname>blocking</methodname>() is true, releases the connection block.</para></effects> </destructor> <method-group name="connection blocking"> <method name="unblock"> <type>void</type> <effects><para>If <methodname>blocking</methodname>() is true, releases the connection block. Note, the connection may remain blocked due to other <code>shared_connection_block</code> objects.</para></effects> <postconditions><para><code>this->blocking() == false</code>.</para></postconditions> </method> <method name="block"> <type>void</type> <effects><para>If <methodname>blocking</methodname>() is false, reasserts a block on the connection.</para></effects> <postconditions><para><code>this->blocking() == true</code>.</para></postconditions> </method> <method name="blocking" cv="const"> <type>bool</type> <returns><para><code>true</code> if <code>this</code> is asserting a block on the connection.</para></returns> <notes><para><code>this->blocking() == true</code> implies <code><methodname>connection::blocked</methodname>() == true</code> for the connection. However, <code>this->blocking() == false</code> does not necessarily imply <code>connection::blocked() == false</code>, since the connection may be blocked by another <code>shared_connection_block</code> objects.</para></notes> </method> </method-group> </class> </namespace> </namespace> </header> --- NEW FILE: single_threaded.xml --- <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE header PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd"> <header name="boost/signals/single_threaded.hpp" last-revision="$Date: 2007/03/06 21:51:55 $"> <using-namespace name="boost"/> <using-namespace name="boost::signals"/> <namespace name="boost"> <namespace name="signals"> <class name="single_threaded"> <purpose>Single-threaded choice for the ThreadingModel template parameter of a signal.</purpose> <description> <para>The <code>single_threaded</code> class will produce a multi-thread-unsafe signal class when used as the signal's <code>ThreadingModel</code> template parameter. The signal might still be used in a multi-threaded program, as long as the signal is only used by a single thread. The signal may have slightly better performance that a thread-safe signal, since it performs no locking. </para> </description> </class> </namespace> </namespace> </header> --- NEW FILE: predestructible.xml --- <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE header PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd"> <header name="boost/predestructible.hpp" last-revision="$Date: 2007/03/06 21:51:55 $"> <using-namespace name="boost"/> <namespace name="boost"> <class name="predestructible"> <destructor specifiers="[protected] virtual"/> <method name="predestruct" specifiers="virtual"> <type>void</type> <notes><para>Override <code>predestruct()</code> with your class' pre-destructor. It will be called automatically if you manage your objects with <code>shared_ptr</code>s that use <classname>predestructing_deleter</classname> as their deleter, such as those created with <functionname>deconstruct_ptr()</functionname></para> </notes> </method> <purpose>A base class for classes with predestructors, used in conjunction with <functionname>deconstruct_ptr</functionname>(). </purpose> </class> </namespace> </header> --- NEW FILE: postconstructible.xml --- <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE header PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd"> <header name="boost/postconstructible.hpp" last-revision="$Date: 2007/03/06 21:51:55 $"> <using-namespace name="boost"/> <namespace name="boost"> <class name="postconstructible"> <destructor specifiers="[protected] virtual"/> <method name="postconstruct" specifiers="[protected] virtual"> <type>void</type> <notes><para>Override <code>postconstruct()</code> with your class's post-constructor. It will be called automatically if you manage your objects with <code>shared_ptr</code>s created with <functionname>deconstruct_ptr()</functionname>. </para></notes> </method> <purpose>A base class for classes with postconstructors, used in conjunction with <functionname>deconstruct_ptr</functionname>(). </purpose> </class> </namespace> </header> Index: last_value.xml =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/thread_safe_signals/doc/reference/last_value.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- last_value.xml 5 Mar 2007 19:54:28 -0000 1.1 +++ last_value.xml 6 Mar 2007 21:51:55 -0000 1.2 @@ -27,9 +27,9 @@ </parameter> <effects><para>Attempts to dereference every iterator in the sequence <computeroutput>[first, last)</computeroutput>. - Swallows <class>boost::expired_slot</class> exceptions thrown by failed dereference attempts.</para></effects> + Swallows <classname>boost::expired_slot</classname> exceptions thrown by failed dereference attempts.</para></effects> <returns><para>The result of the last successful iterator dereference.</para></returns> - <throws><para><class>boost::no_slots_error</class> if no iterators were successfully dereferenced, + <throws><para><classname>boost::no_slots_error</classname> if no iterators were successfully dereferenced, unless the template type of <code>last_value</code> is <code>void</code> or <code>optional<T></code>.</para></throws> </method> </method-group> @@ -61,7 +61,7 @@ </parameter> <effects><para>Attempts to dereference every iterator in the sequence <computeroutput>[first, last)</computeroutput>. - Swallows <class>boost::expired_slot</class> exceptions thrown by failed dereference attempts.</para></effects> + Swallows <classname>boost::expired_slot</classname> exceptions thrown by failed dereference attempts.</para></effects> </method> </method-group> </class-specialization> @@ -94,11 +94,22 @@ </parameter> <effects><para>Attempts to dereference every iterator in the sequence <computeroutput>[first, last)</computeroutput>. - Swallows <class>boost::expired_slot</class> exceptions thrown by failed dereference attempts.</para></effects> - <returns><para>An <code>optional<T> containing the result of the last successful iterator dereference, - or an uninitalized optional<T> if no iterators were successfully dereferenced.</para></returns> + Swallows <classname>boost::expired_slot</classname> exceptions thrown by failed dereference attempts.</para></effects> + <returns><para>An <code>optional<T></code> containing the result of the last successful iterator dereference, + or an uninitalized <code>optional<T></code> if no iterators were successfully dereferenced.</para></returns> </method> </method-group> </class-specialization> + + <class name="no_slots_error"> + <inherit access="public"><classname>std::exception</classname></inherit> + <purpose>Indicates a combiner was unable to synthesize a return value.</purpose> + <description>The <code>no_slots_error</code> exception may be thrown by <classname>last_value</classname> + when it is run but unable to obtain any results from its input iterators. + </description> + <method name="what" cv="const" specifiers="virtual"> + <type>const char * </type> + </method> + </class> </namespace> </header> Index: visit_each.xml =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/thread_safe_signals/doc/reference/visit_each.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- visit_each.xml 5 Mar 2007 19:54:28 -0000 1.1 +++ visit_each.xml 6 Mar 2007 21:51:55 -0000 1.2 @@ -11,10 +11,10 @@ <type>void</type> <parameter name="visitor"> <paramtype>const Visitor&</paramtype> - </parameter> + </parameter> <parameter name="t"> <paramtype>const T&</paramtype> - </parameter> + </parameter> <parameter> <paramtype>int</paramtype> </parameter> @@ -24,7 +24,7 @@ <description> <para>The <functionname>visit_each</functionname> mechanism allows a visitor to be applied to every subobject in a given - object. It is used by the Signals library to discover + object. It was used by the Signals library to discover (now deprecated) <classname>signals::trackable</classname> objects within a function object, but other uses may surface if used universally (e.g., conservative garbage collection). To fit @@ -35,7 +35,7 @@ <effects><para><code>visitor(t)</code>, and for every subobject <code>x</code> of - <code>t</code>: + <code>t</code>: <itemizedlist> <listitem><para>If <code>x</code> is a reference, <code>visit_each(visitor, <functionname>ref</functionname>(x), 0)</code></para></listitem> <listitem><para>Otherwise, <code>visit_each(visitor, x, 0)</code></para></listitem> @@ -55,6 +55,6 @@ <para>Calls to visit_each are required to be unqualified, to enable argument-dependent lookup.</para></notes> - </function> + </function> </namespace> </header> Index: reference.xml =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/thread_safe_signals/doc/reference/reference.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- reference.xml 5 Mar 2007 19:54:28 -0000 1.1 +++ reference.xml 6 Mar 2007 21:51:55 -0000 1.2 @@ -6,6 +6,13 @@ <xi:include href="signal_header.xml"/> <xi:include href="slot.xml"/> <xi:include href="connection.xml"/> - <xi:include href="visit_each.xml"/> + <xi:include href="shared_connection_block.xml"/> <xi:include href="last_value.xml"/> + <xi:include href="auto_threaded.xml"/> + <xi:include href="single_threaded.xml"/> + <xi:include href="multi_threaded.xml"/> + <xi:include href="deconstruct_ptr.xml"/> + <xi:include href="postconstructible.xml"/> + <xi:include href="predestructible.xml"/> + <xi:include href="visit_each.xml"/> </library-reference> \ No newline at end of file --- NEW FILE: auto_threaded.xml --- <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE header PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd"> <header name="boost/signals/auto_threaded.hpp" last-revision="$Date: 2007/03/06 21:51:55 $"> <using-namespace name="boost"/> <using-namespace name="boost::signals"/> <namespace name="boost"> <namespace name="signals"> <class name="auto_threaded"> <purpose>Automatically enabled/disabled thread-safety for a signal.</purpose> <description> <para>The <code>auto_threaded</code> class will produce a thread-safe signal class when used as a signal's <code>ThreadingModel</code> template parameter if and only if boost has detected thread support in the compiler's current translation mode. The header file <code>boost/config.hpp</code> defines the macro BOOST_HAS_THREADS when boost detects threading support. The user may globally disable thread support in boost by defining BOOST_DISABLE_THREADS before any boost header files are included. </para> <para>When in thread-safe mode, the <code>auto_threaded</code> class uses a header-only mutex implementation. Thus, it has no dependence on the boost.threads library. If you are already using boost.threads, you may prefer to use the <classname>boost::signals::multi_threaded</classname> <code>ThreadingModel</code>, which uses a mutex class provided by boost.threads. </para> <para>You may wish to use a thread-unsafe signal in a multi-threaded program, if the signal is only used by a single thread. In that case, you may prefer to use the <classname>boost::signals::single_threaded</classname> class as your <code>ThreadingModel</code>. </para> </description> </class> </namespace> </namespace> </header> |