williamr@2: /* Copyright 2003-2006 Joaquín M López Muñoz. williamr@2: * Distributed under the Boost Software License, Version 1.0. williamr@2: * (See accompanying file LICENSE_1_0.txt or copy at williamr@2: * http://www.boost.org/LICENSE_1_0.txt) williamr@2: * williamr@2: * See http://www.boost.org/libs/multi_index for library home page. williamr@2: */ williamr@2: williamr@2: #ifndef BOOST_MULTI_INDEX_DETAIL_UNBOUNDED_HPP williamr@2: #define BOOST_MULTI_INDEX_DETAIL_UNBOUNDED_HPP williamr@2: williamr@2: #if defined(_MSC_VER)&&(_MSC_VER>=1200) williamr@2: #pragma once williamr@2: #endif williamr@2: williamr@2: #include /* keep it first to prevent nasty warns in MSVC */ williamr@2: #include williamr@2: williamr@2: namespace boost{ williamr@2: williamr@2: namespace multi_index{ williamr@2: williamr@2: /* dummy type and variable for use in ordered_index::range() */ williamr@2: williamr@2: namespace detail{ williamr@2: williamr@2: struct unbounded_type{}; williamr@2: williamr@2: } /* namespace multi_index::detail */ williamr@2: williamr@2: namespace{ williamr@2: williamr@2: #if BOOST_WORKAROUND(BOOST_MSVC,<1300) williamr@2: /* The default branch actually works for MSVC 6.0, but seems like williamr@2: * the const qualifier reduces the performance of ordered indices! This williamr@2: * behavior is hard to explain and probably a test artifact, but it williamr@2: * does not hurt to have the workaround anyway. williamr@2: */ williamr@2: williamr@2: static detail::unbounded_type unbounded_obj=detail::unbounded_type(); williamr@2: static detail::unbounded_type& unbounded=unbounded_obj; williamr@2: #else williamr@2: const detail::unbounded_type unbounded=detail::unbounded_type(); williamr@2: #endif williamr@2: williamr@2: } /* unnamed */ williamr@2: williamr@2: } /* namespace multi_index */ williamr@2: williamr@2: } /* namespace boost */ williamr@2: williamr@2: #endif