Last change
on this file since 35 was
29,
checked in by landauf, 16 years ago
|
updated boost from 1_33_1 to 1_34_1
|
File size:
1.3 KB
|
Line | |
---|
1 | /* Copyright 2003-2006 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_UNBOUNDED_HPP |
---|
10 | #define BOOST_MULTI_INDEX_DETAIL_UNBOUNDED_HPP |
---|
11 | |
---|
12 | #if defined(_MSC_VER)&&(_MSC_VER>=1200) |
---|
13 | #pragma once |
---|
14 | #endif |
---|
15 | |
---|
16 | #include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */ |
---|
17 | #include <boost/detail/workaround.hpp> |
---|
18 | |
---|
19 | namespace boost{ |
---|
20 | |
---|
21 | namespace multi_index{ |
---|
22 | |
---|
23 | /* dummy type and variable for use in ordered_index::range() */ |
---|
24 | |
---|
25 | namespace detail{ |
---|
26 | |
---|
27 | struct unbounded_type{}; |
---|
28 | |
---|
29 | } /* namespace multi_index::detail */ |
---|
30 | |
---|
31 | namespace{ |
---|
32 | |
---|
33 | #if BOOST_WORKAROUND(BOOST_MSVC,<1300) |
---|
34 | /* The default branch actually works for MSVC 6.0, but seems like |
---|
35 | * the const qualifier reduces the performance of ordered indices! This |
---|
36 | * behavior is hard to explain and probably a test artifact, but it |
---|
37 | * does not hurt to have the workaround anyway. |
---|
38 | */ |
---|
39 | |
---|
40 | static detail::unbounded_type unbounded_obj=detail::unbounded_type(); |
---|
41 | static detail::unbounded_type& unbounded=unbounded_obj; |
---|
42 | #else |
---|
43 | const detail::unbounded_type unbounded=detail::unbounded_type(); |
---|
44 | #endif |
---|
45 | |
---|
46 | } /* unnamed */ |
---|
47 | |
---|
48 | } /* namespace multi_index */ |
---|
49 | |
---|
50 | } /* namespace boost */ |
---|
51 | |
---|
52 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.