MongoDB C++ Driver
legacy-1.1.2
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
src
mongo
platform
unordered_set.h
1
/* Copyright 2012 10gen Inc.
2
*
3
* Licensed under the Apache License, Version 2.0 (the "License");
4
* you may not use this file except in compliance with the License.
5
* You may obtain a copy of the License at
6
*
7
* http://www.apache.org/licenses/LICENSE-2.0
8
*
9
* Unless required by applicable law or agreed to in writing, software
10
* distributed under the License is distributed on an "AS IS" BASIS,
11
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
* See the License for the specific language governing permissions and
13
* limitations under the License.
14
*/
15
16
#pragma once
17
18
// We need to drag in a C++ header so we can examine __GXX_EXPERIMENTAL_CXX0X__ or
19
// _LIBCPP_VERSION meaningfully. The <new> header is pretty lightweight, mostly unavoidable,
20
// and almost certain to bring in the standard library configuration macros.
21
#include <new>
22
23
// NOTE(acm): Before gcc-4.7, __cplusplus is always defined to be 1, so we can't reliably
24
// detect C++11 support by exclusively checking the value of __cplusplus. Additionaly, libc++,
25
// whether in C++11 or C++03 mode, doesn't use TR1 and drops things into std instead.
26
#if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__) || defined(_LIBCPP_VERSION)
27
28
#include <unordered_set>
29
30
namespace
mongo
{
31
32
using
std::unordered_set;
33
34
}
// namespace mongo
35
36
#elif defined(_MSC_VER) && _MSC_VER >= 1500
37
38
#include <unordered_set>
39
40
namespace
mongo
{
41
42
#if _MSC_VER >= 1600
/* Visual Studio 2010+ */
43
using
std::unordered_set;
44
#else
45
using
std::tr1::unordered_set;
46
#endif
47
48
}
// namespace mongo
49
50
#elif defined(__GNUC__)
51
52
#include <tr1/unordered_set>
53
54
namespace
mongo
{
55
56
using
std::tr1::unordered_set;
57
58
}
// namespace mongo
59
60
#else
61
#error "Compiler's standard library does not provide a C++ unordered_set implementation."
62
#endif
mongo
Utility functions for parsing numbers from strings.
Definition:
compare_numbers.h:20
Generated by
1.8.10