TRIQS/TRIQS
4.0.0
Researching Interacting Quantum Systems
Loading...
Searching...
No Matches
first_include.hpp
Go to the documentation of this file.
1
// Copyright (c) 2013-2018 Commissariat à l'énergie atomique et aux énergies alternatives (CEA)
2
// Copyright (c) 2013-2018 Centre national de la recherche scientifique (CNRS)
3
// Copyright (c) 2018-2020 Simons Foundation
4
//
5
// This program is free software: you can redistribute it and/or modify
6
// it under the terms of the GNU General Public License as published by
7
// the Free Software Foundation, either version 3 of the License, or
8
// (at your option) any later version.
9
//
10
// This program is distributed in the hope that it will be useful,
11
// but WITHOUT ANY WARRANTY; without even the implied warranty of
12
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
// GNU General Public License for more details.
14
//
15
// You may obtain a copy of the License at
16
// https://www.gnu.org/licenses/gpl-3.0.txt
17
//
18
// Authors: Olivier Parcollet, Nils Wentzell
19
24
25
#pragma once
26
27
#include <complex>
28
33
35
using
dcomplex = std::complex<double>;
36
38
39
#if defined __GNUC__ && !defined __clang__
40
// GCC version as an integer of the form `major * 10000 + minor * 100 + patchlevel` (only defined on GCC).
41
#define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
42
#endif
43
44
// Disable std::auto_ptr (removed in C++17) usage in boost.
45
#define BOOST_NO_AUTO_PTR
46
47
// Workaround for a GCC 15 + Boost issue on macOS builds.
48
#if defined(__GNUC__) && (__GNUC__ == 15) && defined(__APPLE__) && !defined(__clang__)
49
#define BOOST_HAS_LONG_LONG 1
50
#endif
51
52
// Annotation consumed by the legacy cpp2py wrapper generator to skip a declaration.
53
#define CPP2PY_IGNORE __attribute__((annotate("ignore_in_python")))
54
55
// Annotation consumed by the legacy cpp2py wrapper generator to wrap an argument as a Python dictionary.
56
#define CPP2PY_ARG_AS_DICT __attribute__((annotate("use_parameter_class")))
57
58
// The annotations below are only emitted under Clang (the AST analyzer used by the wrapper generator). Under
59
// other compilers they expand to nothing so they do not affect the produced binary.
60
#if defined(__clang__)
61
#define TRIQS_WRAP_ARG_AS_DICT CPP2PY_ARG_AS_DICT
62
#define TRIQS_WRAP_IGNORE CPP2PY_IGNORE
63
#define TRIQS_CPP2PY_IGNORE CPP2PY_IGNORE
64
#else
65
#define TRIQS_WRAP_ARG_AS_DICT
66
#define TRIQS_WRAP_IGNORE
67
#define TRIQS_CPP2PY_IGNORE
68
#endif
triqs
utility
first_include.hpp
Generated by
1.15.0