Boost-Geometry-Utils

 view release on metacpan or  search on metacpan

MANIFEST  view on Meta::CPAN

3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
src/boost/utility/enable_if.hpp
src/boost/utility/identity_type.hpp
src/boost/utility/in_place_factory.hpp
src/boost/utility/result_of.hpp
src/boost/utility/swap.hpp
src/boost/utility/value_init.hpp
src/boost/variant/apply_visitor.hpp
src/boost/variant/detail/apply_visitor_binary.hpp
src/boost/variant/detail/apply_visitor_delayed.hpp
src/boost/variant/detail/apply_visitor_unary.hpp
src/boost/variant/detail/backup_holder.hpp
src/boost/variant/detail/bool_trait_def.hpp
src/boost/variant/detail/bool_trait_undef.hpp
src/boost/variant/detail/cast_storage.hpp
src/boost/variant/detail/config.hpp
src/boost/variant/detail/enable_recursive_fwd.hpp
src/boost/variant/detail/forced_return.hpp
src/boost/variant/detail/generic_result_type.hpp
src/boost/variant/detail/has_nothrow_move.hpp
src/boost/variant/detail/has_trivial_move.hpp
src/boost/variant/detail/hash_variant.hpp

src/boost/variant/detail/backup_holder.hpp  view on Meta::CPAN

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
//-----------------------------------------------------------------------------
// boost variant/detail/backup_holder.hpp header file
// See http://www.boost.org for updates, documentation, and revision history.
//-----------------------------------------------------------------------------
//
// Copyright (c) 2003
// Eric Friedman
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
 
#ifndef BOOST_VARIANT_DETAIL_BACKUP_HOLDER_HPP
#define BOOST_VARIANT_DETAIL_BACKUP_HOLDER_HPP
 
#include "boost/config.hpp"
#include "boost/assert.hpp"
 
namespace boost {
namespace detail { namespace variant {
 
template <typename T>
class backup_holder
{
private: // representation
 
    T* backup_;
 
public: // structors
 
    ~backup_holder()
    {
        delete backup_;
    }
 
    explicit backup_holder(T* backup) BOOST_NOEXCEPT
        : backup_(backup)
    {
    }
 
    backup_holder(const backup_holder&);
 
public: // modifiers
 
    backup_holder& operator=(const backup_holder& rhs)
    {
        *backup_ = rhs.get();
        return *this;
    }
 
    backup_holder& operator=(const T& rhs)
    {
        *backup_ = rhs;
        return *this;
    }
 
    void swap(backup_holder& rhs) BOOST_NOEXCEPT
    {
        T* tmp = rhs.backup_;
        rhs.backup_ = this->backup_;
        this->backup_ = tmp;
    }
 
public: // queries
 
    T& get()
    {
        return *backup_;
    }
 
    const T& get() const
    {
        return *backup_;
    }
 
};
 
template <typename T>
backup_holder<T>::backup_holder(const backup_holder&)
    : backup_(0)
{
    // not intended for copy, but do not want to prohibit syntactically
    BOOST_ASSERT(false);
}
 
template <typename T>
void swap(backup_holder<T>& lhs, backup_holder<T>& rhs) BOOST_NOEXCEPT
{
    lhs.swap(rhs);
}
 
}} // namespace detail::variant
} // namespace boost
 
#endif // BOOST_VARIANT_DETAIL_BACKUP_HOLDER_HPP

src/boost/variant/detail/visitation_impl.hpp  view on Meta::CPAN

8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
 
#ifndef BOOST_VARIANT_DETAIL_VISITATION_IMPL_HPP
#define BOOST_VARIANT_DETAIL_VISITATION_IMPL_HPP
 
#include "boost/config.hpp"
 
#include "boost/variant/detail/backup_holder.hpp"
#include "boost/variant/detail/cast_storage.hpp"
#include "boost/variant/detail/forced_return.hpp"
#include "boost/variant/detail/generic_result_type.hpp"
 
#include "boost/assert.hpp"
#include "boost/mpl/eval_if.hpp"
#include "boost/mpl/bool.hpp"
#include "boost/mpl/identity.hpp"
#include "boost/mpl/int.hpp"
#include "boost/mpl/next.hpp"

src/boost/variant/detail/visitation_impl.hpp  view on Meta::CPAN

115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
// (detail) function template visitation_impl_invoke
//
// Invokes the given visitor on the specified type in the given storage.
//
 
template <typename Visitor, typename VoidPtrCV, typename T>
inline
    BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(typename Visitor::result_type)
visitation_impl_invoke_impl(
      int, Visitor& visitor, VoidPtrCV storage, T*
    , mpl::true_// never_uses_backup
    )
{
    return visitor.internal_visit(
          cast_storage<T>(storage), 1L
        );
}
 
template <typename Visitor, typename VoidPtrCV, typename T>
inline
    BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(typename Visitor::result_type)
visitation_impl_invoke_impl(
      int internal_which, Visitor& visitor, VoidPtrCV storage, T*
    , mpl::false_// never_uses_backup
    )
{
    if (internal_which >= 0)
    {
        return visitor.internal_visit(
              cast_storage<T>(storage), 1L
            );
    }
    else
    {
        return visitor.internal_visit(
              cast_storage< backup_holder<T> >(storage), 1L
            );
    }
}
 
template <typename Visitor, typename VoidPtrCV, typename T, typename NoBackupFlag>
inline
    BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(typename Visitor::result_type)
visitation_impl_invoke(
      int internal_which, Visitor& visitor, VoidPtrCV storage, T* t
    , NoBackupFlag
    , int
    )
{
    typedef typename mpl::or_<
          NoBackupFlag
        , has_nothrow_move_constructor<T>
        , has_nothrow_copy<T>
        >::type never_uses_backup;
 
    return (visitation_impl_invoke_impl)(
          internal_which, visitor, storage, t
        , never_uses_backup()
        );
}
 
template <typename Visitor, typename VoidPtrCV, typename NBF>
inline
    BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(typename Visitor::result_type)
visitation_impl_invoke(int, Visitor&, VoidPtrCV, apply_visitor_unrolled*, NBF, long)
{
    // should never be here at runtime:
    BOOST_ASSERT(false);

src/boost/variant/detail/visitation_impl.hpp  view on Meta::CPAN

213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
      typename Which, typename step0
    , typename Visitor, typename VoidPtrCV
    , typename NoBackupFlag
    >
inline
    BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(typename Visitor::result_type)
visitation_impl(
      const int internal_which, const int logical_which
    , Visitor& visitor, VoidPtrCV storage
    , mpl::false_ // is_apply_visitor_unrolled
    , NoBackupFlag no_backup_flag
    , Which* = 0, step0* = 0
    )
{
    // Typedef apply_visitor_unrolled steps and associated types...
#   define BOOST_VARIANT_AUX_APPLY_VISITOR_STEP_TYPEDEF(z, N, _) \
    typedef typename BOOST_PP_CAT(step,N)::type BOOST_PP_CAT(T,N); \
    typedef typename BOOST_PP_CAT(step,N)::next \
        BOOST_PP_CAT(step, BOOST_PP_INC(N)); \
    /**/

src/boost/variant/detail/visitation_impl.hpp  view on Meta::CPAN

242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
    // ...switch on the target which-index value...
    switch (logical_which)
    {
 
    // ...applying the appropriate case:
#   define BOOST_VARIANT_AUX_APPLY_VISITOR_STEP_CASE(z, N, _) \
    case (Which::value + (N)): \
        return (visitation_impl_invoke)( \
              internal_which, visitor, storage \
            , static_cast<BOOST_PP_CAT(T,N)*>(0) \
            , no_backup_flag, 1L \
            ); \
    /**/
 
    BOOST_PP_REPEAT(
          BOOST_VARIANT_VISITATION_UNROLLING_LIMIT
        , BOOST_VARIANT_AUX_APPLY_VISITOR_STEP_CASE
        , _
        )
 
#   undef BOOST_VARIANT_AUX_APPLY_VISITOR_STEP_CASE

src/boost/variant/detail/visitation_impl.hpp  view on Meta::CPAN

273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
        next_step;
 
    typedef typename next_step::type next_type;
    typedef typename is_same< next_type,apply_visitor_unrolled >::type
        is_apply_visitor_unrolled;
 
    return visitation_impl(
          internal_which, logical_which
        , visitor, storage
        , is_apply_visitor_unrolled()
        , no_backup_flag
        , static_cast<next_which*>(0), static_cast<next_step*>(0)
        );
}
 
}} // namespace detail::variant
} // namespace boost
 
#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) 
# pragma warning(pop) 
#endif

src/boost/variant/variant.hpp  view on Meta::CPAN

18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#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"
#include "boost/mpl/aux_/value_wknd.hpp"
 
#include "boost/variant/variant_fwd.hpp"
#include "boost/variant/detail/backup_holder.hpp"
#include "boost/variant/detail/enable_recursive_fwd.hpp"
#include "boost/variant/detail/forced_return.hpp"
#include "boost/variant/detail/initializer.hpp"
#include "boost/variant/detail/make_variant_list.hpp"
#include "boost/variant/detail/over_sequence.hpp"
#include "boost/variant/detail/visitation_impl.hpp"
#include "boost/variant/detail/hash_variant.hpp"
 
#include "boost/variant/detail/generic_result_type.hpp"
#include "boost/variant/detail/has_nothrow_move.hpp"

src/boost/variant/variant.hpp  view on Meta::CPAN

235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
template <typename Types, typename NeverUsesBackupFlag>
struct make_storage
{
private: // helpers, for metafunction result (below)
 
    typedef typename mpl::eval_if<
          NeverUsesBackupFlag
        , mpl::identity< Types >
        , mpl::push_front<
              Types, backup_holder<void*>
            >
        >::type types;
 
    typedef typename max_value<
          types, mpl::sizeof_<mpl::_1>
        >::type max_size;
 
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x0551))
 
    typedef typename mpl::fold<

src/boost/variant/variant.hpp  view on Meta::CPAN

401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
    explicit copy_into(void* storage) BOOST_NOEXCEPT
        : storage_(storage)
    {
    }
 
public: // internal visitor interface
 
    template <typename T>
        BOOST_VARIANT_AUX_RETURN_VOID_TYPE
    internal_visit(boost::detail::variant::backup_holder<T>& operand, long) const
    {
        new(storage_) T( operand.get() );
        BOOST_VARIANT_AUX_RETURN_VOID;
    }
 
    template <typename T>
        BOOST_VARIANT_AUX_RETURN_VOID_TYPE
    internal_visit(const boost::detail::variant::backup_holder<T>& operand, long) const
    {
        new(storage_) T( operand.get() );
        BOOST_VARIANT_AUX_RETURN_VOID;
    }
 
    template <typename T>
        BOOST_VARIANT_AUX_RETURN_VOID_TYPE
    internal_visit(const T& operand, int) const
    {
        new(storage_) T(operand);

src/boost/variant/variant.hpp  view on Meta::CPAN

449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
    explicit move_into(void* storage) BOOST_NOEXCEPT
        : storage_(storage)
    {
    }
 
public: // internal visitor interface
 
    template <typename T>
        BOOST_VARIANT_AUX_RETURN_VOID_TYPE
    internal_visit(boost::detail::variant::backup_holder<T>& operand, long) const
    {
        new(storage_) T( ::boost::detail::variant::move(operand.get()) );
        BOOST_VARIANT_AUX_RETURN_VOID;
    }
 
    template <typename T>
        BOOST_VARIANT_AUX_RETURN_VOID_TYPE
    internal_visit(T& operand, int) const BOOST_NOEXCEPT_IF(BOOST_NOEXCEPT_EXPR(T(boost::declval<T>())))
    {
        new(storage_) T(::boost::detail::variant::move(operand));

src/boost/variant/variant.hpp  view on Meta::CPAN

489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
    explicit assign_storage(const void* rhs_storage) BOOST_NOEXCEPT
        : rhs_storage_(rhs_storage)
    {
    }
 
public: // internal visitor interfaces
 
    template <typename T>
        BOOST_VARIANT_AUX_RETURN_VOID_TYPE
    internal_visit(backup_holder<T>& lhs_content, long) const
    {
        lhs_content.get()
            = static_cast< const backup_holder<T>* >(rhs_storage_)->get();
        BOOST_VARIANT_AUX_RETURN_VOID;
    }
 
    template <typename T>
        BOOST_VARIANT_AUX_RETURN_VOID_TYPE
    internal_visit(const backup_holder<T>& lhs_content, long) const
    {
        lhs_content.get()
            = static_cast< const backup_holder<T>* >(rhs_storage_)->get();
        BOOST_VARIANT_AUX_RETURN_VOID;
    }
 
    template <typename T>
        BOOST_VARIANT_AUX_RETURN_VOID_TYPE
    internal_visit(T& lhs_content, int) const
    {
        // NOTE TO USER :
        // Compile error here indicates one of variant's bounded types does
        // not meet the requirements of the Assignable concept. Thus,

src/boost/variant/variant.hpp  view on Meta::CPAN

546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
    explicit move_storage(void* rhs_storage) BOOST_NOEXCEPT
        : rhs_storage_(rhs_storage)
    {
    }
 
public: // internal visitor interfaces
 
    template <typename T>
        BOOST_VARIANT_AUX_RETURN_VOID_TYPE
    internal_visit(backup_holder<T>& lhs_content, long) const
    {
        lhs_content.get()
            = ::boost::detail::variant::move(static_cast<backup_holder<T>* >(rhs_storage_)->get());
        BOOST_VARIANT_AUX_RETURN_VOID;
    }
 
    template <typename T>
        BOOST_VARIANT_AUX_RETURN_VOID_TYPE
    internal_visit(const backup_holder<T>& lhs_content, long) const
    {
        lhs_content.get()
            = ::boost::detail::variant::move(static_cast<backup_holder<T>* >(rhs_storage_)->get());
        BOOST_VARIANT_AUX_RETURN_VOID;
    }
 
    template <typename T>
        BOOST_VARIANT_AUX_RETURN_VOID_TYPE
    internal_visit(T& lhs_content, int) const
    {
        // NOTE TO USER :
        // Compile error here indicates one of variant's bounded types does
        // not meet the requirements of the Assignable concept. Thus,

src/boost/variant/variant.hpp  view on Meta::CPAN

711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1600))
private:
    // silence MSVC warning C4512: assignment operator could not be generated
    direct_mover& operator= (direct_mover const&);
#endif
};
 
 
///////////////////////////////////////////////////////////////////////////////
// (detail) class backup_assigner
//
// Internal visitor that "assigns" the given value to the visited value,
// using backup to recover if the destroy-copy sequence fails.
//
// NOTE: This needs to be a friend of variant, as it needs access to
// indicate_which, indicate_backup_which, etc.
//
template <typename Variant>
class backup_assigner
    : public static_visitor<>
{
private: // representation
 
    Variant& lhs_;
    int rhs_which_;
    const void* rhs_content_;
    void (*copy_rhs_content_)(void*, const void*);
 
public: // structors
 
    template<class RhsT>
    backup_assigner(Variant& lhs, int rhs_which, const RhsT& rhs_content)
        : lhs_(lhs)
        , rhs_which_(rhs_which)
        , rhs_content_(&rhs_content)
        , copy_rhs_content_(&construct_impl<RhsT>)
    {
    }
 
private: // helpers, for visitor interface (below)
 
    template<class RhsT>
    static void construct_impl(void* addr, const void* obj)
    {
        new(addr) RhsT(*static_cast<const RhsT*>(obj));
    }
 
    template <typename LhsT>
    void backup_assign_impl(
          LhsT& lhs_content
        , mpl::true_// has_nothrow_move
        )
    {
        // Move lhs content to backup...
        LhsT backup_lhs_content(
              ::boost::detail::variant::move(lhs_content)
            ); // nothrow
 
        // ...destroy lhs content...
        lhs_content.~LhsT(); // nothrow
 
        try
        {
            // ...and attempt to copy rhs content into lhs storage:
            copy_rhs_content_(lhs_.storage_.address(), rhs_content_);
        }
        catch (...)
        {
            // In case of failure, restore backup content to lhs storage...
            new(lhs_.storage_.address())
                LhsT(
                      ::boost::detail::variant::move(backup_lhs_content)
                    ); // nothrow
 
            // ...and rethrow:
            throw;
        }
 
        // In case of success, indicate new content type:
        lhs_.indicate_which(rhs_which_); // nothrow
    }
 
    template <typename LhsT>
    void backup_assign_impl(
          LhsT& lhs_content
        , mpl::false_// has_nothrow_move
        )
    {
        // Backup lhs content...
        LhsT* backup_lhs_ptr = new LhsT(lhs_content);
 
        // ...destroy lhs content...
        lhs_content.~LhsT(); // nothrow
 
        try
        {
            // ...and attempt to copy rhs content into lhs storage:
            copy_rhs_content_(lhs_.storage_.address(), rhs_content_);
        }
        catch (...)
        {
            // In case of failure, copy backup pointer to lhs storage...
            new(lhs_.storage_.address())
                backup_holder<LhsT>( backup_lhs_ptr ); // nothrow
 
            // ...indicate now using backup...
            lhs_.indicate_backup_which( lhs_.which() ); // nothrow
 
            // ...and rethrow:
            throw;
        }
 
        // In case of success, indicate new content type...
        lhs_.indicate_which(rhs_which_); // nothrow
 
        // ...and delete backup:
        delete backup_lhs_ptr; // nothrow
    }
 
public: // visitor interface
 
    template <typename LhsT>
        BOOST_VARIANT_AUX_RETURN_VOID_TYPE
    internal_visit(LhsT& lhs_content, int)
    {
        typedef typename has_nothrow_move_constructor<LhsT>::type
            nothrow_move;
 
        backup_assign_impl( lhs_content, nothrow_move() );
 
        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
};
 
///////////////////////////////////////////////////////////////////////////////
// (detail) class swap_with
//
// Visitor that swaps visited value with content of given variant.
//
// Precondition: Given variant MUST have same logical type as visited value.
//

src/boost/variant/variant.hpp  view on Meta::CPAN

1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
    template <typename T>
        BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(result_type)
    internal_visit(const boost::detail::reference_content<T>& operand, long)
    {
        return internal_visit( operand.get(), 1L );
    }
 
    template <typename T>
        BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(result_type)
    internal_visit(boost::detail::variant::backup_holder<T>& operand, long)
    {
        return internal_visit( operand.get(), 1L );
    }
 
    template <typename T>
        BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(result_type)
    internal_visit(const boost::detail::variant::backup_holder<T>& operand, long)
    {
        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
};

src/boost/variant/variant.hpp  view on Meta::CPAN

1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
        fallback_type_;
 
    struct has_fallback_type_
        : mpl::not_<
              is_same< fallback_type_, detail::variant::no_fallback_type >
            >
    {
    };
 
    typedef has_fallback_type_
        never_uses_backup_flag;
 
    typedef typename detail::variant::make_storage<
          internal_types, never_uses_backup_flag
        >::type storage_t;
 
private: // helpers, for representation (below)
 
    // which_ on:
    // * [0,  size<internal_types>) indicates stack content
    // * [-size<internal_types>, 0) indicates pointer to heap backup
    // if which_ >= 0:
    // * then which() -> which_
    // * else which() -> -(which_ + 1)
 
#if !defined(BOOST_VARIANT_MINIMIZE_SIZE)
 
    typedef int which_t;
 
#else // defined(BOOST_VARIANT_MINIMIZE_SIZE)

src/boost/variant/variant.hpp  view on Meta::CPAN

1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
#endif
 
    which_t which_;
    storage_t storage_;
 
    void indicate_which(int which_arg) BOOST_NOEXCEPT
    {
        which_ = static_cast<which_t>( which_arg );
    }
 
    void indicate_backup_which(int which_arg) BOOST_NOEXCEPT
    {
        which_ = static_cast<which_t>( -(which_arg + 1) );
    }
 
private: // helpers, for queries (below)
 
    bool using_backup() const BOOST_NOEXCEPT
    {
        return which_ < 0;
    }
 
public: // queries
 
    int which() const BOOST_NOEXCEPT
    {
        // If using heap backup...
        if (using_backup())
            // ...then return adjusted which_:
            return -(which_ + 1);
 
        // Otherwise, return which_ directly:
        return which_;
    }
 
private: // helpers, for structors (below)
 
    struct initializer

src/boost/variant/variant.hpp  view on Meta::CPAN

1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
    return internal_visit( operand.get(), 1L );
}
 
template <typename T>
int internal_visit(const boost::detail::reference_content<T>& operand, long) const
{
    return internal_visit( operand.get(), 1L );
}
 
template <typename T>
int internal_visit(boost::detail::variant::backup_holder<T>& operand, long) const
{
    return internal_visit( operand.get(), 1L );
}
 
template <typename T>
int internal_visit(const boost::detail::variant::backup_holder<T>& operand, long) const
{
    return internal_visit( operand.get(), 1L );
}
 
template <typename T>
int internal_visit(boost::recursive_wrapper<T>& operand, long) const
{
    return internal_visit( operand.get(), 1L );
}

src/boost/variant/variant.hpp  view on Meta::CPAN

1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
    return internal_visit( operand.get(), 1L );
}
 
template <typename T>
int internal_visit(const boost::detail::reference_content<T>& operand, long) const
{
    return internal_visit( operand.get(), 1L );
}
 
template <typename T>
int internal_visit(boost::detail::variant::backup_holder<T>& operand, long) const
{
    return internal_visit( operand.get(), 1L );
}
 
template <typename T>
int internal_visit(const boost::detail::variant::backup_holder<T>& operand, long) const
{
    return internal_visit( operand.get(), 1L );
}
 
template <typename T>
int internal_visit(boost::recursive_wrapper<T>& operand, long) const
{
    return internal_visit( operand.get(), 1L );
}

src/boost/variant/variant.hpp  view on Meta::CPAN

1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
        // ...and activate the *this's primary storage on success:
        indicate_which(operand.which());
    }
#endif
 
private: // helpers, for modifiers (below)
 
#   if !defined(BOOST_NO_MEMBER_TEMPLATE_FRIENDS)
    template <typename Variant>
    friend class detail::variant::backup_assigner;
#   endif
 
    // class assigner
    //
    // Internal visitor that "assigns" the visited value to the given variant
    // by appropriate destruction and copy-construction.
    //
 
    class assigner
        : public static_visitor<>

src/boost/variant/variant.hpp  view on Meta::CPAN

1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
    }
 
    template <typename RhsT>
    void assign_impl(
          const RhsT& rhs_content
        , mpl::false_// has_nothrow_copy
        , mpl::false_// has_nothrow_move_constructor
        , mpl::false_// has_fallback_type
        )
    {
        detail::variant::backup_assigner<wknd_self_t>
            visitor(lhs_, rhs_which_, rhs_content);
        lhs_.internal_apply_visitor(visitor);
    }
 
public: // internal visitor interfaces
 
    template <typename RhsT>
        BOOST_VARIANT_AUX_RETURN_VOID_TYPE
    internal_visit(const RhsT& rhs_content, int)
    {

src/boost/variant/variant.hpp  view on Meta::CPAN

2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
    }
 
    template <typename RhsT>
    void assign_impl(
          const RhsT& rhs_content
        , mpl::false_// has_nothrow_copy
        , mpl::false_// has_nothrow_move_constructor
        , mpl::false_// has_fallback_type
        )
    {
        detail::variant::backup_assigner<wknd_self_t>
            visitor(lhs_, rhs_which_, rhs_content);
        lhs_.internal_apply_visitor(visitor);
    }
 
public: // internal visitor interfaces
 
    template <typename RhsT>
        BOOST_VARIANT_AUX_RETURN_VOID_TYPE
    internal_visit(RhsT& rhs_content, int)
    {

src/boost/variant/variant.hpp  view on Meta::CPAN

2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
    typedef typename mpl::begin<internal_types>::type first_it;
    typedef typename mpl::end<internal_types>::type last_it;
 
    typedef detail::variant::visitation_impl_step<
          first_it, last_it
        > first_step;
 
    return detail::variant::visitation_impl(
          internal_which, logical_which
        , visitor, storage, mpl::false_()
        , never_uses_backup_flag()
        , static_cast<first_which*>(0), static_cast<first_step*>(0)
        );
}
 
template <typename Visitor>
    BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(
          typename Visitor::result_type
        )
internal_apply_visitor(Visitor& visitor)
{



( run in 0.747 second using v1.01-cache-2.11-cpan-87723dcf8b7 )