Ariles
Loading...
Searching...
No Matches
misc.h
Go to the documentation of this file.
1/**
2 @file
3 @author Alexander Sherikov
4
5 @copyright 2019 Alexander Sherikov, Licensed under the Apache License, Version 2.0.
6 (see @ref LICENSE or http://www.apache.org/licenses/LICENSE-2.0)
7
8 @brief Various one-liners
9*/
10
11#ifndef H_CPPUT_MISC
12#define H_CPPUT_MISC
13
14/**
15 * Sometimes it is not possible to omit name of an unused parameter, in such
16 * cases this macro can be used to suppress compiler warnings about unused
17 * parameters.
18 */
19#define CPPUT_UNUSED_ARG(parameter) (void)parameter;
20
21#define CPPUT_MACRO_SUBSTITUTE(macro) macro
22
23#define CPPUT_DISABLE_CLASS_COPY(Class) \
24public: \
25 Class(const Class &) = delete; \
26 Class &operator=(const Class &) = delete; \
27 Class(Class &&) = delete; \
28 Class &operator=(Class &&) = delete;
29
30namespace cpput
31{
32 template <typename T>
33 inline void ignoreResult(const T && /* unused result */)
34 {
35 }
36} // namespace cpput
37
38#endif
Definition concat.h:17
void ignoreResult(const T &&)
Definition misc.h:33