mirror of
https://github.com/boostorg/variant.git
synced 2026-07-22 13:53:38 +00:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 967c14f7b5 | |||
| 5edc863174 | |||
| d465155ccc | |||
| ddf192fc53 | |||
| de56bdaa0a | |||
| 2d1dea19ba | |||
| 39469616d2 |
@@ -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>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -477,11 +477,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)
|
||||
{
|
||||
}
|
||||
@@ -1568,7 +1568,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:
|
||||
|
||||
@@ -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 ]
|
||||
;
|
||||
}
|
||||
Reference in New Issue
Block a user