williamr@2
|
1 |
/* Copyright 2003-2006 Joaquín M López Muñoz.
|
williamr@2
|
2 |
* Distributed under the Boost Software License, Version 1.0.
|
williamr@2
|
3 |
* (See accompanying file LICENSE_1_0.txt or copy at
|
williamr@2
|
4 |
* http://www.boost.org/LICENSE_1_0.txt)
|
williamr@2
|
5 |
*
|
williamr@2
|
6 |
* See http://www.boost.org/libs/multi_index for library home page.
|
williamr@2
|
7 |
*/
|
williamr@2
|
8 |
|
williamr@2
|
9 |
#ifndef BOOST_MULTI_INDEX_DETAIL_UNBOUNDED_HPP
|
williamr@2
|
10 |
#define BOOST_MULTI_INDEX_DETAIL_UNBOUNDED_HPP
|
williamr@2
|
11 |
|
williamr@2
|
12 |
#if defined(_MSC_VER)&&(_MSC_VER>=1200)
|
williamr@2
|
13 |
#pragma once
|
williamr@2
|
14 |
#endif
|
williamr@2
|
15 |
|
williamr@2
|
16 |
#include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
|
williamr@2
|
17 |
#include <boost/detail/workaround.hpp>
|
williamr@2
|
18 |
|
williamr@2
|
19 |
namespace boost{
|
williamr@2
|
20 |
|
williamr@2
|
21 |
namespace multi_index{
|
williamr@2
|
22 |
|
williamr@2
|
23 |
/* dummy type and variable for use in ordered_index::range() */
|
williamr@2
|
24 |
|
williamr@2
|
25 |
namespace detail{
|
williamr@2
|
26 |
|
williamr@2
|
27 |
struct unbounded_type{};
|
williamr@2
|
28 |
|
williamr@2
|
29 |
} /* namespace multi_index::detail */
|
williamr@2
|
30 |
|
williamr@2
|
31 |
namespace{
|
williamr@2
|
32 |
|
williamr@2
|
33 |
#if BOOST_WORKAROUND(BOOST_MSVC,<1300)
|
williamr@2
|
34 |
/* The default branch actually works for MSVC 6.0, but seems like
|
williamr@2
|
35 |
* the const qualifier reduces the performance of ordered indices! This
|
williamr@2
|
36 |
* behavior is hard to explain and probably a test artifact, but it
|
williamr@2
|
37 |
* does not hurt to have the workaround anyway.
|
williamr@2
|
38 |
*/
|
williamr@2
|
39 |
|
williamr@2
|
40 |
static detail::unbounded_type unbounded_obj=detail::unbounded_type();
|
williamr@2
|
41 |
static detail::unbounded_type& unbounded=unbounded_obj;
|
williamr@2
|
42 |
#else
|
williamr@2
|
43 |
const detail::unbounded_type unbounded=detail::unbounded_type();
|
williamr@2
|
44 |
#endif
|
williamr@2
|
45 |
|
williamr@2
|
46 |
} /* unnamed */
|
williamr@2
|
47 |
|
williamr@2
|
48 |
} /* namespace multi_index */
|
williamr@2
|
49 |
|
williamr@2
|
50 |
} /* namespace boost */
|
williamr@2
|
51 |
|
williamr@2
|
52 |
#endif
|