Line | |
---|
1 | /* Copyright 2003-2005 Joaquín M López Muñoz.
|
---|
2 | * Distributed under the Boost Software License, Version 1.0.
|
---|
3 | * (See accompanying file LICENSE_1_0.txt or copy at
|
---|
4 | * http://www.boost.org/LICENSE_1_0.txt)
|
---|
5 | *
|
---|
6 | * See http://www.boost.org/libs/multi_index for library home page.
|
---|
7 | */
|
---|
8 |
|
---|
9 | #ifndef BOOST_MULTI_INDEX_DETAIL_DEF_CTOR_TUPLE_CONS_HPP
|
---|
10 | #define BOOST_MULTI_INDEX_DETAIL_DEF_CTOR_TUPLE_CONS_HPP
|
---|
11 |
|
---|
12 | #if defined(_MSC_VER)&&(_MSC_VER>=1200)
|
---|
13 | #pragma once
|
---|
14 | #endif
|
---|
15 |
|
---|
16 | #include <boost/config.hpp>
|
---|
17 |
|
---|
18 | #if defined(BOOST_MSVC)
|
---|
19 | /* In MSVC, tuples::cons is not default constructible. We provide a
|
---|
20 | * tiny wrapper around tuple::cons filling that hole.
|
---|
21 | */
|
---|
22 |
|
---|
23 | #include <boost/tuple/tuple.hpp>
|
---|
24 |
|
---|
25 | namespace boost{
|
---|
26 |
|
---|
27 | namespace multi_index{
|
---|
28 |
|
---|
29 | namespace detail{
|
---|
30 |
|
---|
31 | template<typename Cons>
|
---|
32 | struct default_constructible_tuple_cons:Cons
|
---|
33 | {
|
---|
34 | default_constructible_tuple_cons():
|
---|
35 | Cons(
|
---|
36 | Cons::head_type(),
|
---|
37 | static_cast<const Cons::tail_type&>(
|
---|
38 | default_constructible_tuple_cons<Cons::tail_type>()))
|
---|
39 | {}
|
---|
40 |
|
---|
41 | default_constructible_tuple_cons(const Cons& cons):Cons(cons){}
|
---|
42 | };
|
---|
43 |
|
---|
44 | template<>
|
---|
45 | struct default_constructible_tuple_cons<tuples::null_type>:tuples::null_type
|
---|
46 | {
|
---|
47 | default_constructible_tuple_cons(){}
|
---|
48 | default_constructible_tuple_cons(const tuples::null_type&){}
|
---|
49 | };
|
---|
50 |
|
---|
51 | } /* namespace multi_index::detail */
|
---|
52 |
|
---|
53 | } /* namespace multi_index */
|
---|
54 |
|
---|
55 | } /* namespace boost */
|
---|
56 |
|
---|
57 | #endif /* BOOST_MSVC */
|
---|
58 |
|
---|
59 | #endif
|
---|
Note: See
TracBrowser
for help on using the repository browser.