Inja  3.4.0
A Template Engine for Modern C++
inja.hpp
1 /*
2  ___ _ Version 3.4.0
3  |_ _|_ __ (_) __ _ https://github.com/pantor/inja
4  | || '_ \ | |/ _` | Licensed under the MIT License <http://opensource.org/licenses/MIT>.
5  | || | | || | (_| |
6  |___|_| |_|/ |\__,_| Copyright (c) 2018-2023 Lars Berscheid
7  |__/
8 Permission is hereby granted, free of charge, to any person obtaining a copy
9 of this software and associated documentation files (the "Software"), to deal
10 in the Software without restriction, including without limitation the rights
11 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12 copies of the Software, and to permit persons to whom the Software is
13 furnished to do so, subject to the following conditions:
14 The above copyright notice and this permission notice shall be included in all
15 copies or substantial portions of the Software.
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 SOFTWARE.
23 */
24 
25 #ifndef INCLUDE_INJA_INJA_HPP_
26 #define INCLUDE_INJA_INJA_HPP_
27 
28 #include <nlohmann/json.hpp>
29 
30 namespace inja {
31 #ifndef INJA_DATA_TYPE
32 using json = nlohmann::json;
33 #else
34 using json = INJA_DATA_TYPE;
35 #endif
36 } // namespace inja
37 
38 #if (defined(__cpp_exceptions) || defined(__EXCEPTIONS) || defined(_CPPUNWIND)) && !defined(INJA_NOEXCEPTION)
39 #ifndef INJA_THROW
40 #define INJA_THROW(exception) throw exception
41 #endif
42 #else
43 #include <cstdlib>
44 #ifndef INJA_THROW
45 #define INJA_THROW(exception) \
46  std::abort(); \
47  std::ignore = exception
48 #endif
49 #ifndef INJA_NOEXCEPTION
50 #define INJA_NOEXCEPTION
51 #endif
52 #endif
53 
54 #include "environment.hpp"
55 #include "exceptions.hpp"
56 #include "parser.hpp"
57 #include "renderer.hpp"
58 #include "template.hpp"
59 
60 #endif // INCLUDE_INJA_INJA_HPP_