Compare commits

...

17 Commits

Author SHA1 Message Date
Beman Dawes 1ec2a30fe8 Release 1.44.0
[SVN r64846]
2010-08-16 15:03:16 +00:00
Daniel James 64d68fc379 Merge documentation fixes.
* Use `doc/src/*.css` instead of `doc/html/*.css`.
* Remove wiki and people directories.
* Some documentation fixes.
* Left out `minimal.css` changes and boostbook changes because of clashes.


[SVN r63347]
2010-06-26 12:30:09 +00:00
Steven Watanabe 19ba44bb3f Merge variant from the trunk. Fixes #1507
[SVN r62742]
2010-06-10 15:32:07 +00:00
Hartmut Kaiser 4d02fbcd84 Variant: merged fixes for MSVC warnings from trunk
[SVN r57532]
2009-11-10 02:36:45 +00:00
Troy D. Straszheim 4f4555fa93 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
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
19 changed files with 119 additions and 93 deletions
+7 -1
View File
@@ -1,5 +1,11 @@
project boost/doc ;
import boostbook : boostbook ;
boostbook variant-doc : variant.xml ;
boostbook variant-doc
:
variant.xml
:
<xsl:param>boost.root=../../../..
<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
@@ -19,7 +19,11 @@
#include "boost/variant/detail/apply_visitor_unary.hpp"
#if BOOST_WORKAROUND(__EDG__, BOOST_TESTED_AT(302))
#include "boost/utility/enable_if.hpp"
#include "boost/mpl/not.hpp"
#include "boost/type_traits/is_const.hpp"
#endif
namespace boost {
@@ -63,6 +67,9 @@ public: // visitor interfaces
return visitor_(value1_, value2);
}
private:
apply_visitor_binary_invoke& operator=(const apply_visitor_binary_invoke&);
};
template <typename Visitor, typename Visitable2>
@@ -100,6 +107,9 @@ public: // visitor interfaces
return boost::apply_visitor(invoker, visitable2_);
}
private:
apply_visitor_binary_unwrap& operator=(const apply_visitor_binary_unwrap&);
};
}} // namespace detail::variant
@@ -72,6 +72,9 @@ public: // binary visitor interface
return apply_visitor(visitor_, visitable1, visitable2);
}
private:
apply_visitor_delayed_t& operator=(const apply_visitor_delayed_t&);
};
template <typename Visitor>
@@ -17,7 +17,11 @@
#include "boost/detail/workaround.hpp"
#include "boost/variant/detail/generic_result_type.hpp"
#if BOOST_WORKAROUND(__EDG__, BOOST_TESTED_AT(302))
#include "boost/utility/enable_if.hpp"
#include "boost/mpl/not.hpp"
#include "boost/type_traits/is_const.hpp"
#endif
namespace boost {
@@ -64,6 +64,9 @@ public: // visitor interface
out_ << operand;
}
private:
printer& operator=(const printer&);
};
}} // namespace detail::variant
@@ -35,6 +35,10 @@
#include "boost/type_traits/has_nothrow_copy.hpp"
#include "boost/variant/detail/has_nothrow_move.hpp"
#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
# pragma warning (push)
# pragma warning (disable : 4702) //unreachable code
#endif
///////////////////////////////////////////////////////////////////////////////
// BOOST_VARIANT_VISITATION_UNROLLING_LIMIT
@@ -283,4 +287,8 @@ visitation_impl(
}} // namespace detail::variant
} // namespace boost
#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
# pragma warning(pop)
#endif
#endif // BOOST_VARIANT_DETAIL_VISITATION_IMPL_HPP
+45 -4
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"
@@ -53,6 +56,7 @@
#include "boost/mpl/eval_if.hpp"
#include "boost/mpl/begin_end.hpp"
#include "boost/mpl/bool.hpp"
#include "boost/mpl/not.hpp"
#include "boost/mpl/empty.hpp"
#include "boost/mpl/find_if.hpp"
#include "boost/mpl/front.hpp"
@@ -290,7 +294,8 @@ public: // visitor interfaces
{
operand.~T();
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x0551))
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x0551)) || \
BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1600))
operand; // suppresses warnings
#endif
@@ -477,11 +482,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)
{
}
@@ -529,6 +534,11 @@ public: // visitor interface
#endif // MSVC6 workaround
#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1600))
private:
// silence MSVC warning C4512: assignment operator could not be generated
direct_assigner& operator= (direct_assigner const&);
#endif
};
///////////////////////////////////////////////////////////////////////////////
@@ -647,6 +657,11 @@ public: // visitor interface
BOOST_VARIANT_AUX_RETURN_VOID;
}
#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1600))
private:
// silence MSVC warning C4512: assignment operator could not be generated
backup_assigner& operator= (backup_assigner const&);
#endif
};
///////////////////////////////////////////////////////////////////////////////
@@ -684,6 +699,9 @@ public: // internal visitor interfaces
::boost::detail::variant::move_swap( operand, other );
}
private:
swap_with& operator=(const swap_with&);
};
///////////////////////////////////////////////////////////////////////////////
@@ -691,6 +709,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 +725,8 @@ public: // visitor interfaces
};
#endif // BOOST_NO_TYPEID
///////////////////////////////////////////////////////////////////////////////
// (detail) class comparer
//
@@ -740,6 +763,9 @@ public: // visitor interfaces
return Comp()(lhs_content, rhs_content);
}
private:
comparer& operator=(const comparer&);
};
///////////////////////////////////////////////////////////////////////////////
@@ -891,6 +917,11 @@ public: // internal visitor interfaces, cont.
return internal_visit( operand.get(), 1L );
}
#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1600))
private:
// silence MSVC warning C4512: assignment operator could not be generated
invoke_visitor& operator= (invoke_visitor const&);
#endif
};
}} // namespace detail::variant
@@ -1541,6 +1572,11 @@ private: // helpers, for modifiers (below)
BOOST_VARIANT_AUX_RETURN_VOID;
}
#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1600))
private:
// silence MSVC warning C4512: assignment operator could not be generated
assigner& operator= (assigner const&);
#endif
};
friend class assigner;
@@ -1568,7 +1604,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 +1663,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 +1861,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
-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 ]
;
}
+7
View File
@@ -11,6 +11,11 @@
# provided the above notices are retained, and a notice that the code was
# modified is included with the above copyright notice.
#
project
: requirements
#<dependency>/boost/test//minimal
<toolset>msvc:<asynch-exceptions>on
;
test-suite variant
:
@@ -28,3 +33,5 @@ test-suite variant
[ run variant_comparison_test.cpp ]
[ run 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
+3
View File
@@ -197,6 +197,9 @@ public:
ValueType& expected_;
private:
compare_helper& operator=(const compare_helper&);
};
template<typename VariantType, typename ExpectedType>
+2
View File
@@ -63,6 +63,7 @@ void check_fail(Variant& v)
try
{
T& r = get<T>(v);
(void)r; // suppress warning about r not being used
BOOST_CHECK(false && &r); // should never reach
}
catch(boost::bad_get&)
@@ -110,3 +111,4 @@ int test_main(int , char* [])
return boost::exit_success;
}