]> git.lyx.org Git - lyx.git/blob - src/support/shared_ptr.h
Improve C++11 support
[lyx.git] / src / support / shared_ptr.h
1 // -*- C++ -*-
2 /**
3  * \file shared_ptr.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Peter Kümmel
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef LYX_SHARED_PTR_H
13 #define LYX_SHARED_PTR_H
14
15 #ifdef LYX_USE_TR1
16
17 #include <memory>
18
19 #ifdef __GNUC__
20 #include <tr1/memory>
21 #endif
22
23 #define LYX_SHAREDPTR_NS std::tr1
24
25 #elif __cplusplus >= 201103L
26
27 #include <memory>
28 #define LYX_SHAREDPTR_NS std
29
30 #else
31
32 #include <boost/shared_ptr.hpp>
33 #define LYX_SHAREDPTR_NS boost
34
35 #endif
36
37 namespace lyx
38 {
39         using LYX_SHAREDPTR_NS::shared_ptr;
40         using LYX_SHAREDPTR_NS::const_pointer_cast;
41 }
42
43 #undef LYX_SHAREDPTR_NS
44
45
46 #endif