Zao SDK for Jetson / libzep API Reference
Loading...
Searching...
No Matches
Common.hpp
1/*
2 * Copyright (c) 2022-2023, Soliton Systems K.K. All rights reserved.
3 * Use in source and binary forms, with or without modification,
4 * is permitted provided that the following a condition is met:
5 *
6 * Use is permitted only in accordance with the terms and
7 * conditions set forth in the Software License Agreement available
8 * at https://zao-sdk.org/license-agreement/.
9 */
10#ifndef ZEP_COMMON_HPP_
11#define ZEP_COMMON_HPP_
12
13#if __cplusplus < 201402L
14#error "ZEP library requires C++14 or newer"
15#elif __cplusplus < 201703L
16
17// C++14
18
19#if defined(__GNUC__) && (__GNUC__ >= 4)
20#define ZEP_NODISCARD __attribute__((warn_unused_result))
21#elif defined(_MSC_VER) && (_MSC_VER >= 1700)
22#define ZEP_NODISCARD _Check_return_
23#else
24#define ZEP_NODISCARD
25#endif
26
27#else
28
29// C++17 or higher
30
31#define ZEP_NODISCARD [[nodiscard]]
32
33#endif
34
35#endif // ZEP_COMMON_HPP_