IDS peak ICV v1.0.0
Loading...
Searching...
No Matches
peak_icv_defines.hpp
Go to the documentation of this file.
1
11#pragma once
12
13#ifndef PEAK_ICV_NO_DISCARD
14# ifndef PEAK_ICV_MAYBE_UNUSED
15// clang-format off
16# if __cplusplus >= 201703L || _MSVC_LANG >= 201703L
17// clang-format on
22# define PEAK_ICV_NO_DISCARD [[nodiscard]]
27# define PEAK_ICV_MAYBE_UNUSED [[maybe_unused]]
28# else
29# ifdef _MSC_VER
34# define PEAK_ICV_NO_DISCARD _Check_return_
39# define PEAK_ICV_MAYBE_UNUSED
40# elif defined(__clang__) || defined(__GNUC__) || defined(__GNUG__)
45# define PEAK_ICV_NO_DISCARD __attribute__((warn_unused_result))
50# define PEAK_ICV_MAYBE_UNUSED __attribute__((unused))
51# else
56# define PEAK_ICV_NO_DISCARD
61# define PEAK_ICV_MAYBE_UNUSED
62# endif
63# endif
64# endif
65#endif