QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
userconfig.hpp
1/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
3/*
4 Copyright (C) 2004, 2011 Ferdinando Ametrano
5 Copyright (C) 2004, 2005 StatPro Italia srl
6
7 This file is part of QuantLib, a free-software/open-source library
8 for financial quantitative analysts and developers - http://quantlib.org/
9
10 QuantLib is free software: you can redistribute it and/or modify it
11 under the terms of the QuantLib license. You should have received a
12 copy of the license along with this program; if not, please email
13 <quantlib-dev@lists.sf.net>. The license is also available online at
14 <http://quantlib.org/license.shtml>.
15
16 This program is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
18 FOR A PARTICULAR PURPOSE. See the license for more details.
19*/
20
21#ifndef quantlib_config_hpp
22#define quantlib_config_hpp
23
24/***************************************************************
25 User configuration section:
26 modify the following definitions to suit your preferences.
27
28 Do not modify this file if you are using a Linux/Unix system:
29 it will not be read by the compiler. The definitions below
30 will be provided by running ./configure instead.
31****************************************************************/
32
33/* Define this if error messages should include current function
34 information. */
35#ifndef QL_ERROR_FUNCTIONS
36//# define QL_ERROR_FUNCTIONS
37#endif
38
39/* Define this if error messages should include file and line information. */
40#ifndef QL_ERROR_LINES
41//# define QL_ERROR_LINES
42#endif
43
44/* Define this if tracing messages should be allowed (whether they are
45 actually emitted will depend on run-time settings.) */
46#ifndef QL_ENABLE_TRACING
47//# define QL_ENABLE_TRACING
48#endif
49
50/* Define this if extra safety checks should be performed. This can degrade
51 performance. */
52#ifndef QL_EXTRA_SAFETY_CHECKS
53//# define QL_EXTRA_SAFETY_CHECKS
54#endif
55
56/* Define this to use indexed coupons instead of par coupons in floating
57 legs as the default in 'bool IborCoupon::Settings::usingAtParCoupons();'. */
58#ifndef QL_USE_INDEXED_COUPON
59//# define QL_USE_INDEXED_COUPON
60#endif
61
62/* Define this to have singletons return different instances for
63 different threads; in particular, this means that the evaluation
64 date, the stored index fixings and any other settings will be
65 per-thread.
66*/
67#ifndef QL_ENABLE_SESSIONS
68//# define QL_ENABLE_SESSIONS
69#endif
70
71/* Define this to enable the thread-safe observer pattern. You should
72 enable it if you want to use QuantLib via the SWIG layer within
73 the JVM or .NET eco system or any environment with an
74 async garbage collector */
75#ifndef QL_ENABLE_THREAD_SAFE_OBSERVER_PATTERN
76//# define QL_ENABLE_THREAD_SAFE_OBSERVER_PATTERN
77#endif
78
79/* Define this to enable a date resolution down to microseconds and
80 allow for accurate intraday pricing. */
81#ifndef QL_HIGH_RESOLUTION_DATE
82//# define QL_HIGH_RESOLUTION_DATE
83#endif
84
85/* Define this if you want to throw an exception when a notification
86 loop is detected. Enabling this option is recommended but might
87 cause existing code to throw. */
88#ifndef QL_THROW_IN_CYCLES
89//# define QL_THROW_IN_CYCLES
90#endif
91
92/* Undefine this if you want lazy objects to forward all notifications
93 instead of just the first. Disabling this option is safer in some
94 cases but can be a lot slower. */
95#ifndef QL_FASTER_LAZY_OBJECTS
96# define QL_FASTER_LAZY_OBJECTS
97#endif
98
99/* Define this to use std::any instead of boost::any. */
100#ifndef QL_USE_STD_ANY
101//# define QL_USE_STD_ANY
102#endif
103
104/* Define this to use std::optional instead of boost::optional. */
105#ifndef QL_USE_STD_OPTIONAL
106//# define QL_USE_STD_OPTIONAL
107#endif
108
109/* Define this to use standard smart pointers instead of Boost ones.
110 Note that std::shared_ptr does not check access and can
111 cause segmentation faults. */
112#ifndef QL_USE_STD_SHARED_PTR
113//# define QL_USE_STD_SHARED_PTR
114#endif
115
116/* Undefine this to use boost::function and boost::bind instead of
117 std::function and std::bind. */
118#ifndef QL_USE_STD_FUNCTION
119# define QL_USE_STD_FUNCTION
120#endif
121
122/* Undefine this to use boost::tuple instead of std::tuple. */
123#ifndef QL_USE_STD_TUPLE
124# define QL_USE_STD_TUPLE
125#endif
126
127/* Define this to enable the implementation of Null as template functions. */
128#ifndef QL_NULL_AS_FUNCTIONS
129//# define QL_NULL_AS_FUNCTIONS
130#endif
131
132/* Define this to enable the parallel unit test runner */
133#ifndef QL_ENABLE_PARALLEL_UNIT_TEST_RUNNER
134//# define QL_ENABLE_PARALLEL_UNIT_TEST_RUNNER
135#endif
136
137#endif