QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
shared_ptr.hpp
1/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
3/*
4 Copyright (C) 2018 StatPro Italia srl
5
6 This file is part of QuantLib, a free-software/open-source library
7 for financial quantitative analysts and developers - http://quantlib.org/
8
9 QuantLib is free software: you can redistribute it and/or modify it
10 under the terms of the QuantLib license. You should have received a
11 copy of the license along with this program; if not, please email
12 <quantlib-dev@lists.sf.net>. The license is also available online at
13 <http://quantlib.org/license.shtml>.
14
15 This program is distributed in the hope that it will be useful, but WITHOUT
16 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 FOR A PARTICULAR PURPOSE. See the license for more details.
18*/
19
24#ifndef quantlib_shared_ptr_hpp
25#define quantlib_shared_ptr_hpp
26
27#include <ql/qldefines.hpp>
28
29#if defined(QL_USE_STD_SHARED_PTR)
30#include <memory>
31#else
32#include <boost/shared_ptr.hpp>
33#include <boost/make_shared.hpp>
34#include <boost/enable_shared_from_this.hpp>
35#endif
36
37namespace QuantLib {
38
39 namespace ext {
40
41 #if defined(QL_USE_STD_SHARED_PTR)
42 using std::shared_ptr; // NOLINT(misc-unused-using-decls)
43 using std::weak_ptr; // NOLINT(misc-unused-using-decls)
44 using std::make_shared; // NOLINT(misc-unused-using-decls)
45 using std::static_pointer_cast; // NOLINT(misc-unused-using-decls)
46 using std::dynamic_pointer_cast; // NOLINT(misc-unused-using-decls)
47 using std::enable_shared_from_this; // NOLINT(misc-unused-using-decls)
48 #else
49 using boost::shared_ptr; // NOLINT(misc-unused-using-decls)
50 using boost::weak_ptr; // NOLINT(misc-unused-using-decls)
51 using boost::make_shared; // NOLINT(misc-unused-using-decls)
52 using boost::static_pointer_cast; // NOLINT(misc-unused-using-decls)
53 using boost::dynamic_pointer_cast; // NOLINT(misc-unused-using-decls)
54 using boost::enable_shared_from_this; // NOLINT(misc-unused-using-decls)
55 #endif
56
57 }
58
59}
60
61
62#endif
63
Definition: any.hpp:35