Compare commits

...

13 Commits

Author SHA1 Message Date
Beman Dawes 1a235c07fe Release 1.40.0
[SVN r55802]
2009-08-27 16:24:59 +00:00
Daniel James e0151cc209 Add boost license info to documentation for a few libraries.
Merged revisions 55098 via svnmerge from 
https://svn.boost.org/svn/boost/trunk

........
  r55098 | danieljames | 2009-07-22 23:35:08 +0100 (Wed, 22 Jul 2009) | 8 lines
  
  Add boost license info to documentation for a few libraries.
  
    * Boost.Any: Kevlin Henney is in blanket-permission.txt
    * Boost.Variant: Eric Friedman and Itay Maman are both in blanket-permissions.txt
    * Boost.Concept: Idiana University, University of Notre Dame du Lac, Jeremy Siek,
      Lie-Quan Lee, Andrew Lumsdaine are all listed under blanket permissions.
  
    SGI and HP aren't so their license is left alone.
........


[SVN r55188]
2009-07-26 20:11:03 +00:00
Troy D. Straszheim 3bc66e9264 Add basic copyright/license to keep cmake out of the inspection report
[SVN r55095]
2009-07-22 21:51:01 +00:00
Daniel James aa1eeb3b0f Support BOOST_NO_TYPEID and BOOST_NO_IOSTREAM in Boost.Variant. Fixes #3051.
Merged revisions 53682 via svnmerge from 
https://svn.boost.org/svn/boost/trunk

........
  r53682 | danieljames | 2009-06-06 12:46:24 +0100 (Sat, 06 Jun 2009) | 1 line
  
  Support BOOST_NO_TYPEID and BOOST_NO_IOSTREAM in Boost.Variant. Fixes #3051.
........


[SVN r54398]
2009-06-27 07:34:42 +00:00
Steven Watanabe a400952c16 Merge [42989] and [53187] from the trunk.
[SVN r53196]
2009-05-23 05:27:24 +00:00
John Maddock dcc25e1a1d Merge PDF build changes from Trunk.
[SVN r51417]
2009-02-23 18:39:32 +00:00
Troy D. Straszheim c7d1cccc13 merge of cmake build files from trunk per beman
[SVN r50756]
2009-01-24 18:57:20 +00:00
Beman Dawes 5edc863174 Full merge from trunk at revision 41356 of entire boost-root tree.
[SVN r41369]
2007-11-25 18:07:19 +00:00
Beman Dawes d465155ccc Starting point for releases
[SVN r39706]
2007-10-05 14:25:06 +00:00
nobody ddf192fc53 This commit was manufactured by cvs2svn to create tag
'Version_1_34_1'.

[SVN r38286]
2007-07-24 19:28:14 +00:00
Rene Rivera de56bdaa0a Remove obsolete Boost.Build v1 files.
[SVN r35880]
2006-11-06 17:10:46 +00:00
Gennaro Prota 2d1dea19ba manual merge from trunk: fixed typos reported in http://bugs.debian.org/378016
[SVN r34637]
2006-07-20 14:06:13 +00:00
nobody 39469616d2 This commit was manufactured by cvs2svn to create branch 'RC_1_34_0'.
[SVN r33417]
2006-03-21 02:26:31 +00:00
14 changed files with 93 additions and 92 deletions
+28
View File
@@ -0,0 +1,28 @@
#
# Copyright Troy D. Straszheim
#
# Distributed under the Boost Software License, Version 1.0.
# See http://www.boost.org/LICENSE_1_0.txt
#
#----------------------------------------------------------------------------
# This file was automatically generated from the original CMakeLists.txt file
# Add a variable to hold the headers for the library
set (lib_headers
variant.hpp
variant
)
# Add a library target to the build system
boost_library_project(
variant
# SRCDIRS
TESTDIRS test
HEADERS ${lib_headers}
# DOCDIRS
# DESCRIPTION
MODULARIZED
# AUTHORS
# MAINTAINERS
)
+6 -1
View File
@@ -1,5 +1,10 @@
project boost/doc ;
import boostbook : boostbook ;
boostbook variant-doc : variant.xml ;
boostbook variant-doc
:
variant.xml
:
<format>pdf:<xsl:param>boost.url.prefix=http://www.boost.org/doc/libs/release/doc/html
;
+1 -1
View File
@@ -136,7 +136,7 @@
<rationale>
<simpara>While visitation via
<code><functionname>apply_visitor</functionname></code>
is generally prefered due to its greater safety, <code>get</code> may
is generally preferred due to its greater safety, <code>get</code> may
may be more convenient in some cases due to its straightforward
usage.</simpara>
</rationale>
+11
View File
@@ -364,6 +364,11 @@
</returns>
<throws>Will not throw.</throws>
<notes>
<simpara>Not available when <code>BOOST_NO_TYPEID</code> is
defined.</simpara>
</notes>
</method>
</method-group>
@@ -536,6 +541,12 @@
<simpara>Calls <code>out &lt;&lt; x</code>, where <code>x</code> is
the content of <code>rhs</code>.</simpara>
</effects>
<notes>
<simpara>Not available when <code>BOOST_NO_IOSTREAM</code> is
defined.</simpara>
</notes>
</function>
<class name="make_variant_over">
+1 -1
View File
@@ -343,7 +343,7 @@ seq2.push_back(3.14);
are_strict_equals visitor;
assert( std::equal(
v1.begin(), v1.end(), v2.begin()
seq1.begin(), seq1.end(), seq2.begin()
, <functionname>boost::apply_visitor</functionname>( visitor )
) );</programlisting>
+2 -2
View File
@@ -83,9 +83,9 @@ str += " world! ";</programlisting>
<programlisting>void times_two( boost::variant&lt; int, std::string &gt; &amp; operand )
{
if ( int* pi = <functionname>boost::get</functionname>&lt;int&gt;( &amp;v ) )
if ( int* pi = <functionname>boost::get</functionname>&lt;int&gt;( &amp;operand ) )
*pi *= 2;
else if ( std::string* pstr = <functionname>boost::get</functionname>&lt;std::string&gt;( &amp;v ) )
else if ( std::string* pstr = <functionname>boost::get</functionname>&lt;std::string&gt;( &amp;operand ) )
*pstr += *pstr;
}</programlisting>
+5 -10
View File
@@ -21,16 +21,11 @@
</copyright>
<legalnotice>
<para>Permission to copy, use, sell and distribute this software
is granted provided this copyright notice appears in all copies.
Permission to modify the code and to distribute modified code is
granted provided this copyright notice appears in all copies, and
a notice that the code was modified is included with the copyright
notice.</para>
<para> This software is provided "as is" without express or
implied warranty, and with no claim as to its suitability for any
purpose.</para>
<para>Distributed under the Boost Software License, Version 1.0.
(See accompanying file <filename>LICENSE_1_0.txt</filename> or copy at
<ulink
url="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</ulink>)
</para>
</legalnotice>
<librarypurpose>Safe, generic, stack-based discriminated union container</librarypurpose>
+1 -1
View File
@@ -1,6 +1,6 @@
//-----------------------------------------------------------------------------
// boost variant.hpp header file
// See http://www.boost.org for updates, documentation, and revision history.
// See http://www.boost.org/libs/variant for documentation.
//-----------------------------------------------------------------------------
//
// Copyright (c) 2003
+16 -3
View File
@@ -15,7 +15,10 @@
#include <cstddef> // for std::size_t
#include <new> // for placement new
#if !defined(BOOST_NO_TYPEID)
#include <typeinfo> // for typeid, std::type_info
#endif // BOOST_NO_TYPEID
#include "boost/variant/detail/config.hpp"
#include "boost/mpl/aux_/config/eti.hpp"
@@ -477,11 +480,11 @@ class direct_assigner
{
private: // representation
T& rhs_;
const T& rhs_;
public: // structors
explicit direct_assigner(T& rhs)
explicit direct_assigner(const T& rhs)
: rhs_(rhs)
{
}
@@ -691,6 +694,9 @@ public: // internal visitor interfaces
//
// Generic static visitor that performs a typeid on the value it visits.
//
#if !defined(BOOST_NO_TYPEID)
class reflect
: public static_visitor<const std::type_info&>
{
@@ -704,6 +710,8 @@ public: // visitor interfaces
};
#endif // BOOST_NO_TYPEID
///////////////////////////////////////////////////////////////////////////////
// (detail) class comparer
//
@@ -1568,7 +1576,7 @@ private: // helpers, for modifiers (below)
void assign(const T& rhs)
{
// If direct T-to-T assignment is not possible...
detail::variant::direct_assigner<const T> direct_assign(rhs);
detail::variant::direct_assigner<T> direct_assign(rhs);
if (this->apply_visitor(direct_assign) == false)
{
// ...then convert rhs to variant and assign:
@@ -1627,11 +1635,13 @@ public: // queries
return false;
}
#if !defined(BOOST_NO_TYPEID)
const std::type_info& type() const
{
detail::variant::reflect visitor;
return this->apply_visitor(visitor);
}
#endif
public: // prevent comparison with foreign types
@@ -1823,6 +1833,9 @@ inline void swap(
} // namespace boost
// implementation additions
#if !defined(BOOST_NO_IOSTREAM)
#include "boost/variant/detail/variant_io.hpp"
#endif // BOOST_NO_IOSTREAM
#endif // BOOST_VARIANT_VARIANT_HPP
+1
View File
@@ -0,0 +1 @@
boost_module(variant DEPENDS utility)
+15
View File
@@ -0,0 +1,15 @@
#
# Copyright Troy D. Straszheim
#
# Distributed under the Boost Software License, Version 1.0.
# See http://www.boost.org/LICENSE_1_0.txt
#
boost_additional_test_dependencies(variant BOOST_DEPENDS test)
boost_test_run(test1 test1.cpp class_a.cpp)
boost_test_run(test4 test4.cpp class_a.cpp)
set(tests test2 test3 test5 test6 test7 test8 recursive_variant_test variant_reference_test variant_comparison_test variant_visit_test)
foreach(test ${tests})
boost_test_run(${test})
endforeach(test ${tests})
-50
View File
@@ -1,50 +0,0 @@
# Boost.Variant Library test Jamfile
#
# Copyright (C) 2003, Eric Friedman, Itay Maman.
#
# This material is provided "as is", with absolutely no warranty expressed
# or implied. Any use is at your own risk.
#
# Permission to use or copy this software for any purpose is hereby granted
# without fee, provided the above notices are retained on all copies.
# Permission to modify the code and to distribute modified code is granted,
# provided the above notices are retained, and a notice that the code was
# modified is included with the above copyright notice.
#
subproject libs/variant/test ;
# bring in rules for testing
import testing ;
# Make tests run by default.
DEPENDS all : test ;
{
# look in BOOST_ROOT for sources first, just in this Jamfile
local SEARCH_SOURCE = $(BOOST_ROOT) $(SEARCH_SOURCE) ;
test-suite variant
:
[ run libs/variant/test/test1.cpp libs/variant/test/class_a.cpp
: : : : variant_test1 ]
[ run libs/variant/test/test2.cpp
: : : : variant_test2 ]
[ run libs/variant/test/test3.cpp
: : : : variant_test3 ]
[ run libs/variant/test/test4.cpp libs/variant/test/class_a.cpp
: : : : variant_test4 ]
[ run libs/variant/test/test5.cpp
: : : : variant_test5 ]
[ run libs/variant/test/test6.cpp
: : : : variant_test6 ]
[ run libs/variant/test/test7.cpp
: : : : variant_test7 ]
[ run libs/variant/test/test8.cpp
: : : : variant_test8 ]
[ run libs/variant/test/recursive_variant_test.cpp ]
[ run libs/variant/test/variant_reference_test.cpp ]
[ run libs/variant/test/variant_comparison_test.cpp ]
[ run libs/variant/test/variant_visit_test.cpp ]
;
}
+4 -23
View File
@@ -232,29 +232,6 @@ struct int_adder : boost::static_visitor<>
struct held_type_name : boost::static_visitor<std::string>
{
template<typename T>
std::string operator()(const T& ) const
{
ost_ << '[' << typeid(T).name() << ']';
return result();
}
std::string result() const
{
return ost_.str();
}
mutable std::ostringstream ost_;
}; //held_type_name
template<typename T>
struct spec
{
@@ -267,7 +244,9 @@ inline void verify(VariantType& var, spec<S>, std::string str = "")
const VariantType& cvar = var;
BOOST_CHECK(boost::apply_visitor(total_sizeof(), cvar) == sizeof(S));
#if !defined(BOOST_NO_TYPEID)
BOOST_CHECK(cvar.type() == typeid(S));
#endif
//
// Check get<>()
@@ -316,7 +295,9 @@ inline void verify_not(VariantType& var, spec<S>)
{
const VariantType& cvar = var;
#if !defined(BOOST_NO_TYPEID)
BOOST_CHECK(cvar.type() != typeid(S));
#endif
//
// Check get<>()
+2
View File
@@ -122,7 +122,9 @@ int test_main(int, char* [])
std::ostringstream e1_str;
e1_str << e1;
#if !defined(BOOST_NO_TYPEID)
BOOST_CHECK(e1.type() == typeid(Add));
#endif
BOOST_CHECK(e1_str.str() == "(13+((40+2)-(10+4)))");
//Evaluate expression