Compare commits

...

79 Commits

Author SHA1 Message Date
Beman Dawes
1339230970 Release 1.45.0
[SVN r66646]
2010-11-19 15:17:53 +00:00
John Maddock
8176af84e1 Merges changes from Trunk: refer to history.qbk for the details.
[SVN r65708]
2010-10-01 11:11:16 +00:00
Daniel Walker
b7d4b6edae merged [64695] and [64696] result_of docs from trunk
[SVN r64745]
2010-08-11 18:15:46 +00:00
Daniel James
d7cf3628f7 Merge some link fixes.
[64006] and [64059].


[SVN r64061]
2010-07-15 21:19:14 +00:00
Niels Dekker
b273cd3914 Merged value_init fixes (extra tests + documentation) from trunk, see #3472, #3869.
[SVN r63638]
2010-07-04 21:56:44 +00:00
Niels Dekker
ca7db1f361 Merged value_init fixes from trunk, ref #3472, #3869.
[SVN r63637]
2010-07-04 21:50:38 +00:00
Eric Niebler
2a7e81e07f Merged revisions 61248 via svnmerge from
https://svn.boost.org/svn/boost/trunk

........
  r61248 | eric_niebler | 2010-04-13 08:01:11 -0700 (Tue, 13 Apr 2010) | 1 line
  
  add tr1_result_of that always behaves as TR1 specifies, fix Boost.TR1's result_of to use tr1_result_of
........


[SVN r62137]
2010-05-22 05:35:51 +00:00
Daniel James
13da21e7b1 Revert changes to result_of. Reopens #862, #1310, #1535.
[SVN r61149]
2010-04-08 21:59:33 +00:00
Niels Dekker
b3ffef536d Merged std_bitset.cpp (boost::swap test) from trunk r60292 through r60334 and r61065 through r61076, including #3984 fix.
[SVN r61077]
2010-04-05 19:21:12 +00:00
Daniel James
e2c98762db Revert [60052] as it isn't as uncontroversial as I thought.
[SVN r60314]
2010-03-07 16:22:34 +00:00
Daniel James
8af4250c3c Suppress/fix some msvc and gcc compiler warnings ([57494]).
[SVN r60291]
2010-03-07 12:13:29 +00:00
Daniel James
e30889304c Merge some tests for unwrap ([47296], [47297])
[SVN r60290]
2010-03-07 12:11:44 +00:00
Daniel James
b4dee80e61 Merge various result_of changes.
- [42234] Reduce header dependencies, from Shunsuke Sogame. Fixes #1535
 - [45256] result_of implementation that makes use of C++0x decltype, from Daniel Walker. Fixes #862.
 - [48620] Fix result_of to work with const-qualified function pointers. Fixes #1310
 - [60052] Remove use of deprecated config macro in result_of.



[SVN r60289]
2010-03-07 12:08:00 +00:00
Daniel James
a47dce770c Fix some whitespace differences between trunk and release.
[SVN r58878]
2010-01-10 19:17:23 +00:00
Emil Dotchevski
dab1e8e522 Merging changes from trunk.
[SVN r58421]
2009-12-16 22:26:57 +00:00
Daniel James
583422cda2 Add swap to utility index page.
Merged revisions 47093 via svnmerge from 
https://svn.boost.org/svn/boost/trunk


[SVN r57482]
2009-11-08 11:45:20 +00:00
Troy D. Straszheim
ee146a02a1 rm cmake from the release branch before it goes out broken. Policy dictates that you never commit to release, you commit to trunk and merge to release.
[SVN r56941]
2009-10-17 01:10:45 +00:00
Niels Dekker
c131cbd0b2 Merged value_init from the trunk, including fix of #2548, regarding "const value_initialized".
[SVN r56547]
2009-10-03 10:19:09 +00:00
Niels Dekker
f8bef7ba95 Merged value_init_test from trunk, inc. [51356], anticipating the fix of ticket #2548, which will remove implicit conversion from const value_initialized<T> to non-const T&.
[SVN r56543]
2009-10-03 09:08:10 +00:00
Niels Dekker
e54cbf3053 Merged Swap documentation from trunk, including revision [56107] and [56108].
[SVN r56541]
2009-10-03 08:15:14 +00:00
Daniel Frey
d5291d08b8 Merged 52463
[SVN r55485]
2009-08-09 13:45:03 +00:00
Troy D. Straszheim
61755605af Add basic copyright/license to keep cmake out of the inspection report
[SVN r55095]
2009-07-22 21:51:01 +00:00
Emil Dotchevski
cd12e322bd Merging in changes trunk updates: adding standard error_info typedefs, updating the documentation.
[SVN r55094]
2009-07-22 20:55:50 +00:00
Ronald Garcia
8cb975feb7 Merge [47295] to release.
[SVN r53602]
2009-06-03 14:45:12 +00:00
Daniel James
ffe151458e Use local copy of the valid HTML 4.01 icon, and make sure all the pages
that use it are valid.

Merged revisions 53047-53048 via svnmerge from 
https://svn.boost.org/svn/boost/trunk

........
  r53047 | danieljames | 2009-05-16 15:17:20 +0100 (Sat, 16 May 2009) | 1 line
  
  Fix some validation errors.
........
  r53048 | danieljames | 2009-05-16 15:23:59 +0100 (Sat, 16 May 2009) | 1 line
  
  Use a local copy of the valid HTML 4.01 icon.
........


[SVN r53258]
2009-05-25 20:06:26 +00:00
Steven Watanabe
4003a9f74a Merge [53060] from the trunk.
[SVN r53197]
2009-05-23 05:36:13 +00:00
Daniel Frey
211eb04f33 Merge [44151], [48025] to release. Closes #3064.
[SVN r53172]
2009-05-22 09:00:11 +00:00
Jeremiah Willcock
e57213b298 Fixed almost all tab and min/max issues found by inspect tool
[SVN r53142]
2009-05-20 19:41:20 +00:00
Eric Niebler
51f9adbfa1 Merged revisions 52837 via svnmerge from
https://svn.boost.org/svn/boost/trunk

........
  r52837 | eric_niebler | 2009-05-07 10:47:08 -0700 (Thu, 07 May 2009) | 1 line
  
  eliminate noisy warning on msvc
........


[SVN r53054]
2009-05-16 18:15:17 +00:00
Troy D. Straszheim
eaaf17a88f tuning up cmakefiles for unordered, utility
[SVN r53008]
2009-05-15 00:21:14 +00:00
Troy D. Straszheim
48cfd42123 tune up ptr_container, utility tests in cmakeland
[SVN r53007]
2009-05-14 23:56:22 +00:00
Troy D. Straszheim
76aa5d2f27 more cmakefile tweaks
[SVN r52999]
2009-05-14 19:58:42 +00:00
Emil Dotchevski
ce67dde4f0 Documentation update
[SVN r52091]
2009-03-31 22:16:49 +00:00
Peter Dimov
a69e872a91 Merge [51977], [51986], [52010] to release.
[SVN r52040]
2009-03-28 20:53:26 +00:00
Peter Dimov
e3640e45c2 Merge [51872], [51891] to release. Closes #2878.
[SVN r51907]
2009-03-22 20:05:02 +00:00
Peter Dimov
b7cd171b2b Merge [51512] to release. Closes #2128.
[SVN r51534]
2009-03-02 16:32:03 +00:00
Emil Dotchevski
b2e6a82adb This html was outdated; changed to forward to throw_exception.html documentation from Boost Exception
[SVN r50880]
2009-01-29 19:14:05 +00:00
Troy D. Straszheim
390372294a merge of cmake build files from trunk per beman
[SVN r50756]
2009-01-24 18:57:20 +00:00
Niels Dekker
ffbbf38e12 Merged new array-of-array tests of swap utility from trunk to release branch, following changeset [49954].
[SVN r50227]
2008-12-09 18:21:25 +00:00
Niels Dekker
9e73b2c6ae Merged value_initialized::swap from trunk [48424] and [48425], according to ticket #2243, as was agreed with Fernando Cacciola.
[SVN r49967]
2008-11-27 19:37:39 +00:00
Niels Dekker
633832e872 Merged libs/utility/swap.html from trunk to release (r47094 through r49914)
[SVN r49915]
2008-11-24 16:50:22 +00:00
Daniel James
862cb2a4e0 Merged revisions 49661-49662,49666,49669,49735,49756,49770,49811 via svnmerge from
https://svn.boost.org/svn/boost/trunk

........
  r49661 | danieljames | 2008-11-09 12:03:45 +0000 (Sun, 09 Nov 2008) | 1 line
  
  Move hash detail headers out of boost/functional/detail.
........
  r49662 | danieljames | 2008-11-09 12:11:50 +0000 (Sun, 09 Nov 2008) | 1 line
  
  Add a forwarding header for container_fwd.hpp
........
  r49666 | danieljames | 2008-11-09 19:12:05 +0000 (Sun, 09 Nov 2008) | 1 line
  
  Avoid comparing default initialised iterators in position_iterator.
........
  r49669 | danieljames | 2008-11-09 21:57:38 +0000 (Sun, 09 Nov 2008) | 2 lines
  
  Add link to the header to the synopsis in reference documentation.
  Refs #2214
........
  r49735 | danieljames | 2008-11-14 12:51:00 +0000 (Fri, 14 Nov 2008) | 1 line
  
  Explicitly specify the template parameters in the unordered container friend, in order to avoid some warnings.
........
  r49756 | danieljames | 2008-11-14 16:11:16 +0000 (Fri, 14 Nov 2008) | 1 line
  
  Use pragmas to suppress a Visual C++ warning.
........
  r49770 | danieljames | 2008-11-15 13:07:29 +0000 (Sat, 15 Nov 2008) | 1 line
  
  Use the new swap library.
........
  r49811 | danieljames | 2008-11-16 23:10:00 +0000 (Sun, 16 Nov 2008) | 1 line
  
  Fix a typo.
........


[SVN r49855]
2008-11-20 22:53:20 +00:00
Joseph Gauterin
b012f16ee5 Merged utility/swap documentation to release branch.
[SVN r49763]
2008-11-15 01:15:54 +00:00
Joseph Gauterin
3d96ab26d4 Merged utility/swap tests to release branch.
[SVN r49762]
2008-11-15 01:13:01 +00:00
Joseph Gauterin
8652bf51ec Merged utility/swap to release branch.
[SVN r49761]
2008-11-15 01:11:24 +00:00
Nicola Musatti
9168cb9c61 CodeGear patch. Fixes #2341
[SVN r49319]
2008-10-13 19:21:03 +00:00
Daniel James
e1991374ae Merge quickbook workaround and fix some links.
Merged revisions 48987,49230-49231 via svnmerge from 
https://svn.boost.org/svn/boost/trunk

........
  r48987 | danieljames | 2008-09-28 13:21:39 +0100 (Sun, 28 Sep 2008) | 1 line
  
  Clean up some link errors.
........
  r49230 | danieljames | 2008-10-09 23:13:48 +0100 (Thu, 09 Oct 2008) | 1 line
  
  position_iterator is meant to be a forward iterator, so avoid using operator+ with it.
........
  r49231 | danieljames | 2008-10-09 23:14:14 +0100 (Thu, 09 Oct 2008) | 4 lines
  
  Work around the problems with window newlines in position_iterator. (I'm
  about to fix them, but this will get quickbook working immediately).
  
  Fixes #2155
........


[SVN r49242]
2008-10-10 09:29:21 +00:00
Emil Dotchevski
d0ee9a7c28 Boost Exception major refactoring: works with or without RTTI, vastly improved boost::throw_exception integration.
[SVN r48905]
2008-09-19 20:29:26 +00:00
Matthew Calabrese
10e83b490b Merged BOOST_BINARY utility macro.
[SVN r48879]
2008-09-19 08:19:02 +00:00
Marshall Clow
4b24dba257 Replaced copyright symbols with (c) to match trunk
[SVN r48842]
2008-09-18 02:54:03 +00:00
Daniel James
7a036f6f3a Merge some small fixes from trunk.
Merged revisions 46740,46742,47002,47040 via svnmerge from 
https://svn.boost.org/svn/boost/trunk

........
  r46740 | danieljames | 2008-06-26 20:20:56 +0100 (Thu, 26 Jun 2008) | 1 line
  
  Fix a character encoding error.
........
  r46742 | danieljames | 2008-06-26 20:25:38 +0100 (Thu, 26 Jun 2008) | 6 lines
  
  Give the asio documentation its own target.
  
  The asio documentation is built with the rest of the combined documentation but
  is really separate. So give it its own target so that separate parts can be
  built separately.
........
  r47040 | danieljames | 2008-07-03 15:34:56 +0100 (Thu, 03 Jul 2008) | 1 line
  
  Workaround for some template syntax not supported in old versions of Visual C++ 6.5
........


[SVN r47078]
2008-07-04 17:04:47 +00:00
Emil Dotchevski
e632b0fb1f Boost Exception
In other libraries, watch for compile error referring to throw_exception_assert_compatibility in boost::throw_exception. Resolve by throwing an exception that derives from std::exception. This is not a new requirement but it is being enforced now.

[SVN r46818]
2008-06-28 18:29:40 +00:00
Beman Dawes
17bee9d43f With his kind permission, change Jaakko "Järvi" to "Jarvi"
[SVN r46809]
2008-06-28 13:57:20 +00:00
Anthony Williams
492a8ad213 Merge of new boost.thread code along with required changes from boost.bind
[SVN r46474]
2008-06-18 13:01:08 +00:00
Niels Dekker
8827b8ed8b Merged value_init doc + test from trunk, including doc and test for boost::initialized_value, that was added with changeset [46464]
[SVN r46465]
2008-06-17 22:17:14 +00:00
Niels Dekker
8849fbc52d Merged value_init.hpp from trunk, including new boost::initialized_value object. (Was discussed beforehand with Fernando Cacciola.)
[SVN r46464]
2008-06-17 22:14:09 +00:00
Daniel James
50bc75a802 Add minor documentation fixes to the release branch.
(I left out the changes to the hash library).

Merged via svnmerge from 
https://svn.boost.org/svn/boost/trunk

................
  r44807 | danieljames | 2008-04-27 08:39:49 +0100 (Sun, 27 Apr 2008) | 78 lines
  
  Merge in documentation fixes.  Apart from the change to optional's documenation
  Jamfile, which I included by mistake.
  
  I wrote about this at:
  
  http://lists.boost.org/Archives/boost/2008/04/136405.php
  
  Merged revisions 44585-44806 via svnmerge from 
  https://svn.boost.org/svn/boost/branches/doc
  
  ........
    r44585 | danieljames | 2008-04-19 16:25:27 +0100 (Sat, 19 Apr 2008) | 2 lines
    
    Fix broken link to vacpp in bjam docs.
  ........
    r44586 | danieljames | 2008-04-19 16:27:36 +0100 (Sat, 19 Apr 2008) | 2 lines
    
    Fix broken link to bcpp in bjam docs.
  ........
    r44587 | danieljames | 2008-04-19 16:33:58 +0100 (Sat, 19 Apr 2008) | 2 lines
    
    DateTime documentation - Fix a link to the serialization library.
  ........
    r44588 | danieljames | 2008-04-19 16:35:36 +0100 (Sat, 19 Apr 2008) | 2 lines
    
    Fix some links in interprocess & intrusive.
  ........
    r44589 | danieljames | 2008-04-19 16:37:39 +0100 (Sat, 19 Apr 2008) | 2 lines
    
    Fix some links in the python docs.
  ........
    r44590 | danieljames | 2008-04-19 16:38:29 +0100 (Sat, 19 Apr 2008) | 2 lines
    
    Work around a quickbook bug which is affecting the python docs.
  ........
    r44591 | danieljames | 2008-04-19 16:39:34 +0100 (Sat, 19 Apr 2008) | 2 lines
    
    Fix a broken link in the numeric conversion docs.
  ........
    r44592 | danieljames | 2008-04-19 16:40:45 +0100 (Sat, 19 Apr 2008) | 2 lines
    
    Fix some links in the optional docs.
  ........
    r44593 | danieljames | 2008-04-19 16:42:09 +0100 (Sat, 19 Apr 2008) | 2 lines
    
    Fix link to the hash documentation from bimap.
  ........
    r44599 | danieljames | 2008-04-19 18:07:33 +0100 (Sat, 19 Apr 2008) | 2 lines
    
    Fix a typo in the format library.
  ........
    r44600 | danieljames | 2008-04-19 19:20:59 +0100 (Sat, 19 Apr 2008) | 1 line
    
    Initialise svnmerge.
  ........
    r44641 | danieljames | 2008-04-20 18:59:47 +0100 (Sun, 20 Apr 2008) | 2 lines
    
    Fix the lincense url in shared container iterator documentation.
  ........
    r44642 | danieljames | 2008-04-20 19:00:00 +0100 (Sun, 20 Apr 2008) | 2 lines
    
    Fix image link in the mpi documentation.
  ........
    r44643 | danieljames | 2008-04-20 19:00:11 +0100 (Sun, 20 Apr 2008) | 2 lines
    
    Fix a typo in the spirit docs.
  ........
    r44644 | danieljames | 2008-04-20 19:00:23 +0100 (Sun, 20 Apr 2008) | 2 lines
    
    Escape the slash so that quickbook doesn't think it the start of an italic section, and mess up the link. Refs #1844
  ........
    r44647 | danieljames | 2008-04-20 19:39:47 +0100 (Sun, 20 Apr 2008) | 2 lines
    
    Fix another typo in spirit docs.
  ........
................
  r45232 | danieljames | 2008-05-08 22:50:19 +0100 (Thu, 08 May 2008) | 1 line
  
  Fix some invalid xml by replacing ampersands with character entities.
................
  r45576 | danieljames | 2008-05-20 16:39:25 +0100 (Tue, 20 May 2008) | 20 lines
  
  Merge some small documentation fixes from the doc branch, and mark some
  previously merged changes as merged.
  
  Merged revisions 44811,45129,45142,45154,45281-45282,45365 via svnmerge from 
  https://svn.boost.org/svn/boost/branches/doc
  
  ........
    r45129 | danieljames | 2008-05-05 12:36:50 +0100 (Mon, 05 May 2008) | 2 lines
    
    Update navbar links in boostbook.
  ........
    r45282 | danieljames | 2008-05-11 14:15:31 +0100 (Sun, 11 May 2008) | 2 lines
    
    Group functions in the hash header - requires Frank's free-function-group fix.
    (not included in release branch).
  ........
    r45365 | danieljames | 2008-05-14 21:39:00 +0100 (Wed, 14 May 2008) | 2 lines
    
    Add boost.root to standalone hash documentation.
    (not included in release branch).
  ........
................


[SVN r45622]
2008-05-21 20:57:05 +00:00
John Maddock
9b52e49fda Merge inspection failure fixes from Trunk.
[SVN r43634]
2008-03-15 18:45:28 +00:00
Daniel James
ab479794f3 Merged revisions 43206,43208-43213 via svnmerge from
https://svn.boost.org/svn/boost/trunk

........
  r43206 | danieljames | 2008-02-10 09:55:03 +0000 (Sun, 10 Feb 2008) | 1 line
  
  Fix some broken links.
........
  r43209 | danieljames | 2008-02-10 14:56:22 +0000 (Sun, 10 Feb 2008) | 1 line
  
  Link to people pages on the website, as they've been removed from the download.
........
  r43210 | danieljames | 2008-02-10 15:02:17 +0000 (Sun, 10 Feb 2008) | 1 line
  
  Point links to the pages that used to be in 'more' to the site.
........
  r43212 | danieljames | 2008-02-10 16:10:16 +0000 (Sun, 10 Feb 2008) | 1 line
  
  Fix links on the home page as well.
........
  r43213 | danieljames | 2008-02-10 16:21:22 +0000 (Sun, 10 Feb 2008) | 1 line
  
  Generated documentation which is no longer generated.
........


[SVN r43214]
2008-02-10 16:39:38 +00:00
Niels Dekker
97b8966337 value_init doc + test: Merged from trunk changeset [42798] to release.
[SVN r42799]
2008-01-15 19:55:28 +00:00
Niels Dekker
88099a882f Merged value_init.hpp from trunk [42277] to release branch, thereby resolving ticket #1459 and #1491. Fernando Cacciola (owner of value_init) encouraged me to do the commit.
[SVN r42501]
2008-01-05 22:38:50 +00:00
Beman Dawes
d5554eb6d7 Pick up missing smart_ptr, utility, and type_traits files from full merge from trunk at revision 41356 of entire boost-root tree.
[SVN r41386]
2007-11-25 22:34:55 +00:00
Beman Dawes
13bdfb8bbd Full merge from trunk at revision 41356 of entire boost-root tree.
[SVN r41370]
2007-11-25 18:38:02 +00:00
Beman Dawes
74462349c2 Full merge from trunk at revision 41356 of entire boost-root tree.
[SVN r41369]
2007-11-25 18:07:19 +00:00
Beman Dawes
6aa648d315 Starting point for releases
[SVN r39706]
2007-10-05 14:25:06 +00:00
nobody
9ff18c2c96 This commit was manufactured by cvs2svn to create tag
'Version_1_34_1'.

[SVN r38286]
2007-07-24 19:28:14 +00:00
Daniel Frey
d5ea07c737 Merged changes for ticket #979 from HEAD
[SVN r37920]
2007-06-06 20:57:40 +00:00
Fernando Cacciola
aa0096bf42 Testsuite for none_t added.
[SVN r37421]
2007-04-12 14:32:38 +00:00
Daniel James
005c2f3cc8 Fix a couple of links.
[SVN r36656]
2007-01-07 22:58:41 +00:00
Andreas Huber
09f7aab52d Merged L & C issue fixes & HTML conversions from trunk to branch.
[SVN r36281]
2006-12-05 22:33:21 +00:00
Peter Dimov
30a40f9f76 Linked to current_function.html
[SVN r36268]
2006-12-04 20:31:38 +00:00
Vladimir Prus
d9f8bae673 Merge from HEAD.
Allow building of shared versions of some Boost.Test libraries.
Adjust tests to use always use static linking to Boost.Test, since
linking to the shared version requires test changes.

Patch from Juergen Hunold.


[SVN r35990]
2006-11-10 19:59:52 +00:00
Peter Dimov
3c7b409460 License/copyright edits
[SVN r35958]
2006-11-09 20:34:33 +00:00
Beman Dawes
ee3551e8dc Merged copyright and license addition
[SVN r35907]
2006-11-07 19:27:00 +00:00
Rene Rivera
95da2e90de Remove obsolete Boost.Build v1 files.
[SVN r35880]
2006-11-06 17:10:46 +00:00
John Maddock
6dd93ab916 Removed unneeded semicolon.
[SVN r35636]
2006-10-16 18:01:40 +00:00
Hartmut Kaiser
505d419a1b Resolved an ambiguity.
[SVN r35039]
2006-09-08 00:16:31 +00:00
Gennaro Prota
d968b5f5b9 boost guidelines (mainly from inspect tool: tabs, license reference text, etc.); more to do...
[SVN r34753]
2006-07-27 11:48:49 +00:00
nobody
d809d4e832 This commit was manufactured by cvs2svn to create branch 'RC_1_34_0'.
[SVN r33417]
2006-03-21 02:26:31 +00:00
3 changed files with 49 additions and 52 deletions

View File

@@ -14,28 +14,21 @@
<p>But that doesn't mean there isn't useful stuff here. Take a look:</p> <p>But that doesn't mean there isn't useful stuff here. Take a look:</p>
<blockquote> <blockquote>
<p> <p>
<a href="utility.htm#addressof">addressof</a><br>
<a href="assert.html">assert</a><br> <a href="assert.html">assert</a><br>
<a href="base_from_member.html">base_from_member</a><br> <a href="base_from_member.html">base_from_member</a><br>
<a href="utility.htm#BOOST_BINARY">BOOST_BINARY</a><br>
<a href="call_traits.htm">call_traits</a><br> <a href="call_traits.htm">call_traits</a><br>
<a href="checked_delete.html">checked_delete</a><br> <a href="checked_delete.html">checked_delete</a><br>
<a href="compressed_pair.htm">compressed_pair</a><br> <a href="compressed_pair.htm">compressed_pair</a><br>
<a href="current_function.html">current_function</a><br> <a href="current_function.html">current_function</a><br>
<a href="doc/html/declval.html">declval</a><br> <a href="doc/html/declval.html">declval</a><br>
<a href="enable_if.html">enable_if</a><br> <a href="enable_if.html">enable_if</a><br>
<a href="in_place_factories.html">in_place_factory</a><br>
<a href="iterator_adaptors.htm">iterator_adaptors</a><br> <a href="iterator_adaptors.htm">iterator_adaptors</a><br>
<a href="generator_iterator.htm">generator iterator adaptors</a><br> <a href="generator_iterator.htm">generator iterator adaptors</a><br>
<a href="utility.htm#functions_next_prior">next/prior</a><br>
<a href="utility.htm#Class_noncopyable">noncopyable</a><br>
<a href="operators.htm">operators</a><br> <a href="operators.htm">operators</a><br>
<a href="utility.htm#result_of">result_of</a><br>
<a href="swap.html">swap</a><br> <a href="swap.html">swap</a><br>
<a href="throw_exception.html">throw_exception</a><br> <a href="throw_exception.html">throw_exception</a><br>
<a href="utility.htm">utility</a><br> <a href="utility.htm">utility</a><br>
<a href="value_init.htm">value_init</a> <a href="value_init.htm">value_init</a></p>
</p>
</blockquote> </blockquote>
<hr> <hr>
<p>&copy; Copyright Beman Dawes, 2001</p> <p>&copy; Copyright Beman Dawes, 2001</p>
@@ -48,3 +41,4 @@
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->07 November, 2006<!--webbot bot="Timestamp" endspan i-checksum="39368" --></p> <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->07 November, 2006<!--webbot bot="Timestamp" endspan i-checksum="39368" --></p>
</body> </body>
</html> </html>

0
test/next_prior_test.cpp Executable file → Normal file
View File

View File

@@ -22,7 +22,7 @@
#pragma hdrstop #pragma hdrstop
#endif #endif
#include <boost/detail/lightweight_test.hpp> #include "boost/test/minimal.hpp"
// //
// Sample POD type // Sample POD type
@@ -215,7 +215,7 @@ template<class T>
void check_initialized_value ( T const& y ) void check_initialized_value ( T const& y )
{ {
T initializedValue = boost::initialized_value ; T initializedValue = boost::initialized_value ;
BOOST_TEST ( y == initializedValue ) ; BOOST_CHECK ( y == initializedValue ) ;
} }
#ifdef __BORLANDC__ #ifdef __BORLANDC__
@@ -245,125 +245,128 @@ void check_initialized_value( NonPOD const& )
template<class T> template<class T>
bool test ( T const& y, T const& z ) bool test ( T const& y, T const& z )
{ {
const int errors_before_test = boost::detail::test_errors(); const boost::unit_test::counter_t counter_before_test = boost::minimal_test::errors_counter();
check_initialized_value(y); check_initialized_value(y);
boost::value_initialized<T> x ; boost::value_initialized<T> x ;
BOOST_TEST ( y == x ) ; BOOST_CHECK ( y == x ) ;
BOOST_TEST ( y == boost::get(x) ) ; BOOST_CHECK ( y == boost::get(x) ) ;
static_cast<T&>(x) = z ; static_cast<T&>(x) = z ;
boost::get(x) = z ; boost::get(x) = z ;
BOOST_TEST ( x == z ) ; BOOST_CHECK ( x == z ) ;
boost::value_initialized<T> const x_c ; boost::value_initialized<T> const x_c ;
BOOST_TEST ( y == x_c ) ; BOOST_CHECK ( y == x_c ) ;
BOOST_TEST ( y == boost::get(x_c) ) ; BOOST_CHECK ( y == boost::get(x_c) ) ;
T& x_c_ref = const_cast<T&>( boost::get(x_c) ) ; T& x_c_ref = const_cast<T&>( boost::get(x_c) ) ;
x_c_ref = z ; x_c_ref = z ;
BOOST_TEST ( x_c == z ) ; BOOST_CHECK ( x_c == z ) ;
boost::value_initialized<T> const copy1 = x; boost::value_initialized<T> const copy1 = x;
BOOST_TEST ( boost::get(copy1) == boost::get(x) ) ; BOOST_CHECK ( boost::get(copy1) == boost::get(x) ) ;
boost::value_initialized<T> copy2; boost::value_initialized<T> copy2;
copy2 = x; copy2 = x;
BOOST_TEST ( boost::get(copy2) == boost::get(x) ) ; BOOST_CHECK ( boost::get(copy2) == boost::get(x) ) ;
boost::shared_ptr<boost::value_initialized<T> > ptr( new boost::value_initialized<T> ); boost::shared_ptr<boost::value_initialized<T> > ptr( new boost::value_initialized<T> );
BOOST_TEST ( y == *ptr ) ; BOOST_CHECK ( y == *ptr ) ;
#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) #if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
boost::value_initialized<T const> cx ; boost::value_initialized<T const> cx ;
BOOST_TEST ( y == cx ) ; BOOST_CHECK ( y == cx ) ;
BOOST_TEST ( y == boost::get(cx) ) ; BOOST_CHECK ( y == boost::get(cx) ) ;
boost::value_initialized<T const> const cx_c ; boost::value_initialized<T const> const cx_c ;
BOOST_TEST ( y == cx_c ) ; BOOST_CHECK ( y == cx_c ) ;
BOOST_TEST ( y == boost::get(cx_c) ) ; BOOST_CHECK ( y == boost::get(cx_c) ) ;
#endif #endif
return boost::detail::test_errors() == errors_before_test ; return boost::minimal_test::errors_counter() == counter_before_test ;
} }
int main(int, char **) int test_main(int, char **)
{ {
BOOST_TEST ( test( 0,1234 ) ) ; BOOST_CHECK ( test( 0,1234 ) ) ;
BOOST_TEST ( test( 0.0,12.34 ) ) ; BOOST_CHECK ( test( 0.0,12.34 ) ) ;
BOOST_TEST ( test( POD(0,0,0.0), POD('a',1234,56.78f) ) ) ; BOOST_CHECK ( test( POD(0,0,0.0), POD('a',1234,56.78f) ) ) ;
BOOST_TEST ( test( NonPOD( std::string() ), NonPOD( std::string("something") ) ) ) ; BOOST_CHECK ( test( NonPOD( std::string() ), NonPOD( std::string("something") ) ) ) ;
NonPOD NonPOD_object( std::string("NonPOD_object") ); NonPOD NonPOD_object( std::string("NonPOD_object") );
BOOST_TEST ( test<NonPOD *>( 0, &NonPOD_object ) ) ; BOOST_CHECK ( test<NonPOD *>( 0, &NonPOD_object ) ) ;
AggregatePODStruct zeroInitializedAggregatePODStruct = { 0.0f, '\0', 0 }; AggregatePODStruct zeroInitializedAggregatePODStruct = { 0.0f, '\0', 0 };
AggregatePODStruct nonZeroInitializedAggregatePODStruct = { 1.25f, 'a', -1 }; AggregatePODStruct nonZeroInitializedAggregatePODStruct = { 1.25f, 'a', -1 };
BOOST_TEST ( test(zeroInitializedAggregatePODStruct, nonZeroInitializedAggregatePODStruct) ); BOOST_CHECK ( test(zeroInitializedAggregatePODStruct, nonZeroInitializedAggregatePODStruct) );
StringAndInt stringAndInt0; StringAndInt stringAndInt0;
StringAndInt stringAndInt1; StringAndInt stringAndInt1;
stringAndInt0.i = 0; stringAndInt0.i = 0;
stringAndInt1.i = 1; stringAndInt1.i = 1;
stringAndInt1.s = std::string("1"); stringAndInt1.s = std::string("1");
BOOST_TEST ( test(stringAndInt0, stringAndInt1) ); BOOST_CHECK ( test(stringAndInt0, stringAndInt1) );
StructWithDestructor structWithDestructor0; StructWithDestructor structWithDestructor0;
StructWithDestructor structWithDestructor1; StructWithDestructor structWithDestructor1;
structWithDestructor0.i = 0; structWithDestructor0.i = 0;
structWithDestructor1.i = 1; structWithDestructor1.i = 1;
BOOST_TEST ( test(structWithDestructor0, structWithDestructor1) ); BOOST_CHECK ( test(structWithDestructor0, structWithDestructor1) );
StructWithVirtualFunction structWithVirtualFunction0; StructWithVirtualFunction structWithVirtualFunction0;
StructWithVirtualFunction structWithVirtualFunction1; StructWithVirtualFunction structWithVirtualFunction1;
structWithVirtualFunction0.i = 0; structWithVirtualFunction0.i = 0;
structWithVirtualFunction1.i = 1; structWithVirtualFunction1.i = 1;
BOOST_TEST ( test(structWithVirtualFunction0, structWithVirtualFunction1) ); BOOST_CHECK ( test(structWithVirtualFunction0, structWithVirtualFunction1) );
DerivedFromAggregatePODStruct derivedFromAggregatePODStruct0; DerivedFromAggregatePODStruct derivedFromAggregatePODStruct0;
DerivedFromAggregatePODStruct derivedFromAggregatePODStruct1; DerivedFromAggregatePODStruct derivedFromAggregatePODStruct1;
static_cast<AggregatePODStruct &>(derivedFromAggregatePODStruct0) = zeroInitializedAggregatePODStruct; static_cast<AggregatePODStruct &>(derivedFromAggregatePODStruct0) = zeroInitializedAggregatePODStruct;
static_cast<AggregatePODStruct &>(derivedFromAggregatePODStruct1) = nonZeroInitializedAggregatePODStruct; static_cast<AggregatePODStruct &>(derivedFromAggregatePODStruct1) = nonZeroInitializedAggregatePODStruct;
BOOST_TEST ( test(derivedFromAggregatePODStruct0, derivedFromAggregatePODStruct1) ); BOOST_CHECK ( test(derivedFromAggregatePODStruct0, derivedFromAggregatePODStruct1) );
AggregatePODStructWrapper aggregatePODStructWrapper0; AggregatePODStructWrapper aggregatePODStructWrapper0;
AggregatePODStructWrapper aggregatePODStructWrapper1; AggregatePODStructWrapper aggregatePODStructWrapper1;
aggregatePODStructWrapper0.dataMember = zeroInitializedAggregatePODStruct; aggregatePODStructWrapper0.dataMember = zeroInitializedAggregatePODStruct;
aggregatePODStructWrapper1.dataMember = nonZeroInitializedAggregatePODStruct; aggregatePODStructWrapper1.dataMember = nonZeroInitializedAggregatePODStruct;
BOOST_TEST ( test(aggregatePODStructWrapper0, aggregatePODStructWrapper1) ); BOOST_CHECK ( test(aggregatePODStructWrapper0, aggregatePODStructWrapper1) );
ArrayOfBytes zeroInitializedArrayOfBytes = { 0 }; ArrayOfBytes zeroInitializedArrayOfBytes = { 0 };
boost::value_initialized<ArrayOfBytes> valueInitializedArrayOfBytes; boost::value_initialized<ArrayOfBytes> valueInitializedArrayOfBytes;
BOOST_TEST (std::memcmp(get(valueInitializedArrayOfBytes), zeroInitializedArrayOfBytes, sizeof(ArrayOfBytes)) == 0); BOOST_CHECK (std::memcmp(get(valueInitializedArrayOfBytes), zeroInitializedArrayOfBytes, sizeof(ArrayOfBytes)) == 0);
boost::value_initialized<ArrayOfBytes> valueInitializedArrayOfBytes2; boost::value_initialized<ArrayOfBytes> valueInitializedArrayOfBytes2;
valueInitializedArrayOfBytes2 = valueInitializedArrayOfBytes; valueInitializedArrayOfBytes2 = valueInitializedArrayOfBytes;
BOOST_TEST (std::memcmp(get(valueInitializedArrayOfBytes), get(valueInitializedArrayOfBytes2), sizeof(ArrayOfBytes)) == 0); BOOST_CHECK (std::memcmp(get(valueInitializedArrayOfBytes), get(valueInitializedArrayOfBytes2), sizeof(ArrayOfBytes)) == 0);
boost::value_initialized<CopyFunctionCallTester> copyFunctionCallTester1; boost::value_initialized<CopyFunctionCallTester> copyFunctionCallTester1;
BOOST_TEST ( ! get(copyFunctionCallTester1).is_copy_constructed); BOOST_CHECK ( ! get(copyFunctionCallTester1).is_copy_constructed);
BOOST_TEST ( ! get(copyFunctionCallTester1).is_assignment_called); BOOST_CHECK ( ! get(copyFunctionCallTester1).is_assignment_called);
boost::value_initialized<CopyFunctionCallTester> copyFunctionCallTester2 = boost::value_initialized<CopyFunctionCallTester>(copyFunctionCallTester1); boost::value_initialized<CopyFunctionCallTester> copyFunctionCallTester2 = boost::value_initialized<CopyFunctionCallTester>(copyFunctionCallTester1);
BOOST_TEST ( get(copyFunctionCallTester2).is_copy_constructed); BOOST_CHECK ( get(copyFunctionCallTester2).is_copy_constructed);
BOOST_TEST ( ! get(copyFunctionCallTester2).is_assignment_called); BOOST_CHECK ( ! get(copyFunctionCallTester2).is_assignment_called);
boost::value_initialized<CopyFunctionCallTester> copyFunctionCallTester3; boost::value_initialized<CopyFunctionCallTester> copyFunctionCallTester3;
copyFunctionCallTester3 = boost::value_initialized<CopyFunctionCallTester>(copyFunctionCallTester1); copyFunctionCallTester3 = boost::value_initialized<CopyFunctionCallTester>(copyFunctionCallTester1);
BOOST_TEST ( ! get(copyFunctionCallTester3).is_copy_constructed); BOOST_CHECK ( ! get(copyFunctionCallTester3).is_copy_constructed);
BOOST_TEST ( get(copyFunctionCallTester3).is_assignment_called); BOOST_CHECK ( get(copyFunctionCallTester3).is_assignment_called);
boost::value_initialized<SwapFunctionCallTester> swapFunctionCallTester1; boost::value_initialized<SwapFunctionCallTester> swapFunctionCallTester1;
boost::value_initialized<SwapFunctionCallTester> swapFunctionCallTester2; boost::value_initialized<SwapFunctionCallTester> swapFunctionCallTester2;
get(swapFunctionCallTester1).data = 1; get(swapFunctionCallTester1).data = 1;
get(swapFunctionCallTester2).data = 2; get(swapFunctionCallTester2).data = 2;
boost::swap(swapFunctionCallTester1, swapFunctionCallTester2); boost::swap(swapFunctionCallTester1, swapFunctionCallTester2);
BOOST_TEST( get(swapFunctionCallTester1).data == 2 ); BOOST_CHECK( get(swapFunctionCallTester1).data == 2 );
BOOST_TEST( get(swapFunctionCallTester2).data == 1 ); BOOST_CHECK( get(swapFunctionCallTester2).data == 1 );
BOOST_TEST( get(swapFunctionCallTester1).is_custom_swap_called ); BOOST_CHECK( get(swapFunctionCallTester1).is_custom_swap_called );
BOOST_TEST( get(swapFunctionCallTester2).is_custom_swap_called ); BOOST_CHECK( get(swapFunctionCallTester2).is_custom_swap_called );
return boost::report_errors(); return 0;
} }
unsigned int expected_failures = 0;