Version: SMASH-3.1
deprecate_c_functions.h
Go to the documentation of this file.
1 /*
2  *
3  * Copyright (c) 2014-2015,2017-2020
4  * SMASH Team
5  *
6  * GNU General Public License (GPLv3 or later)
7  *
8  */
9 
10 #ifndef SRC_INCLUDE_SMASH_DEPRECATE_C_FUNCTIONS_H_
11 #define SRC_INCLUDE_SMASH_DEPRECATE_C_FUNCTIONS_H_
12 
19 #include <cctype>
20 #include <clocale>
21 #include <cmath>
22 #include <csetjmp>
23 #include <csignal>
24 #include <cstdio>
25 #include <cstdlib>
26 #include <cstring>
27 #include <ctime>
28 #include <cwchar>
29 #include <cwctype>
30 
31 #include "forwarddeclarations.h"
32 #include "macros.h"
33 
34 namespace smash {
35 
53 #define SMASH_DEPRECATE_NONSTD(fun__) \
54  template <typename... Ts> \
55  SMASH_DEPRECATED("Please add the std:: namespace for this function.") \
56  auto fun__(Ts&&... args)->decltype(std::fun__(args...)) { \
57  return std::fun__(args...); \
58  }
78 SMASH_DEPRECATE_NONSTD(clearerr)
80 SMASH_DEPRECATE_NONSTD(copysign)
84 SMASH_DEPRECATE_NONSTD(difftime)
109 SMASH_DEPRECATE_NONSTD(fpclassify)
110 SMASH_DEPRECATE_NONSTD(fprintf)
117 SMASH_DEPRECATE_NONSTD(freopen)
121 SMASH_DEPRECATE_NONSTD(fsetpos)
124 SMASH_DEPRECATE_NONSTD(fwprintf)
126 SMASH_DEPRECATE_NONSTD(fwscanf)
128 SMASH_DEPRECATE_NONSTD(getchar)
131 SMASH_DEPRECATE_NONSTD(getwchar)
135 SMASH_DEPRECATE_NONSTD(isalnum)
136 SMASH_DEPRECATE_NONSTD(isalpha)
137 SMASH_DEPRECATE_NONSTD(iscntrl)
138 SMASH_DEPRECATE_NONSTD(isdigit)
139 SMASH_DEPRECATE_NONSTD(isfinite)
140 SMASH_DEPRECATE_NONSTD(isgraph)
141 SMASH_DEPRECATE_NONSTD(isgreater)
142 SMASH_DEPRECATE_NONSTD(isgreaterequal)
145 SMASH_DEPRECATE_NONSTD(islessequal)
146 SMASH_DEPRECATE_NONSTD(islessgreater)
147 SMASH_DEPRECATE_NONSTD(islower)
149 SMASH_DEPRECATE_NONSTD(isnormal)
150 SMASH_DEPRECATE_NONSTD(isprint)
151 SMASH_DEPRECATE_NONSTD(ispunct)
152 SMASH_DEPRECATE_NONSTD(isspace)
153 SMASH_DEPRECATE_NONSTD(isunordered)
154 SMASH_DEPRECATE_NONSTD(isupper)
155 SMASH_DEPRECATE_NONSTD(iswalnum)
156 SMASH_DEPRECATE_NONSTD(iswalpha)
157 SMASH_DEPRECATE_NONSTD(iswcntrl)
158 SMASH_DEPRECATE_NONSTD(iswctype)
159 SMASH_DEPRECATE_NONSTD(iswdigit)
160 SMASH_DEPRECATE_NONSTD(iswgraph)
161 SMASH_DEPRECATE_NONSTD(iswlower)
162 SMASH_DEPRECATE_NONSTD(iswprint)
163 SMASH_DEPRECATE_NONSTD(iswpunct)
164 SMASH_DEPRECATE_NONSTD(iswspace)
165 SMASH_DEPRECATE_NONSTD(iswupper)
166 SMASH_DEPRECATE_NONSTD(iswxdigit)
167 SMASH_DEPRECATE_NONSTD(isxdigit)
173 SMASH_DEPRECATE_NONSTD(llround)
174 SMASH_DEPRECATE_NONSTD(localeconv)
175 SMASH_DEPRECATE_NONSTD(localtime)
181 SMASH_DEPRECATE_NONSTD(longjmp)
187 SMASH_DEPRECATE_NONSTD(mbrtowc)
188 SMASH_DEPRECATE_NONSTD(mbsinit)
189 SMASH_DEPRECATE_NONSTD(mbsrtowcs)
190 SMASH_DEPRECATE_NONSTD(mbstowcs)
195 SMASH_DEPRECATE_NONSTD(memmove)
202 SMASH_DEPRECATE_NONSTD(nearbyint)
203 SMASH_DEPRECATE_NONSTD(nextafter)
204 SMASH_DEPRECATE_NONSTD(nexttoward)
209 SMASH_DEPRECATE_NONSTD(putchar)
212 SMASH_DEPRECATE_NONSTD(putwchar)
216 SMASH_DEPRECATE_NONSTD(realloc)
217 SMASH_DEPRECATE_NONSTD(remainder)
224 SMASH_DEPRECATE_NONSTD(scalbln)
228 SMASH_DEPRECATE_NONSTD(setlocale)
229 SMASH_DEPRECATE_NONSTD(setvbuf)
231 SMASH_DEPRECATE_NONSTD(signbit)
234 SMASH_DEPRECATE_NONSTD(sprintf)
241 SMASH_DEPRECATE_NONSTD(strcoll)
243 SMASH_DEPRECATE_NONSTD(strcspn)
244 SMASH_DEPRECATE_NONSTD(strerror)
245 SMASH_DEPRECATE_NONSTD(strftime)
247 SMASH_DEPRECATE_NONSTD(strncat)
248 SMASH_DEPRECATE_NONSTD(strncmp)
249 SMASH_DEPRECATE_NONSTD(strncpy)
250 SMASH_DEPRECATE_NONSTD(strpbrk)
251 SMASH_DEPRECATE_NONSTD(strrchr)
257 SMASH_DEPRECATE_NONSTD(strtoul)
258 SMASH_DEPRECATE_NONSTD(strxfrm)
259 SMASH_DEPRECATE_NONSTD(swprintf)
260 SMASH_DEPRECATE_NONSTD(swscanf)
266 SMASH_DEPRECATE_NONSTD(tmpfile)
268 SMASH_DEPRECATE_NONSTD(tolower)
269 SMASH_DEPRECATE_NONSTD(toupper)
270 SMASH_DEPRECATE_NONSTD(towctrans)
271 SMASH_DEPRECATE_NONSTD(towlower)
272 SMASH_DEPRECATE_NONSTD(towupper)
275 SMASH_DEPRECATE_NONSTD(ungetwc)
276 SMASH_DEPRECATE_NONSTD(vfprintf)
277 SMASH_DEPRECATE_NONSTD(vfwprintf)
278 SMASH_DEPRECATE_NONSTD(vprintf)
279 SMASH_DEPRECATE_NONSTD(vsprintf)
280 SMASH_DEPRECATE_NONSTD(vswprintf)
281 SMASH_DEPRECATE_NONSTD(vwprintf)
282 SMASH_DEPRECATE_NONSTD(wcrtomb)
286 SMASH_DEPRECATE_NONSTD(wcscoll)
288 SMASH_DEPRECATE_NONSTD(wcscspn)
289 SMASH_DEPRECATE_NONSTD(wcsftime)
291 SMASH_DEPRECATE_NONSTD(wcsncat)
292 SMASH_DEPRECATE_NONSTD(wcsncmp)
293 SMASH_DEPRECATE_NONSTD(wcsncpy)
294 SMASH_DEPRECATE_NONSTD(wcspbrk)
295 SMASH_DEPRECATE_NONSTD(wcsrchr)
296 SMASH_DEPRECATE_NONSTD(wcsrtombs)
302 SMASH_DEPRECATE_NONSTD(wcstombs)
303 SMASH_DEPRECATE_NONSTD(wcstoul)
304 SMASH_DEPRECATE_NONSTD(wcsxfrm)
307 SMASH_DEPRECATE_NONSTD(wctrans)
309 SMASH_DEPRECATE_NONSTD(wmemchr)
310 SMASH_DEPRECATE_NONSTD(wmemcmp)
311 SMASH_DEPRECATE_NONSTD(wmemcpy)
312 SMASH_DEPRECATE_NONSTD(wmemmove)
313 SMASH_DEPRECATE_NONSTD(wmemset)
314 SMASH_DEPRECATE_NONSTD(wprintf)
316 #undef SMASH_DEPRECATE_NONSTD
317 
318 } // namespace smash
319 
320 #endif // SRC_INCLUDE_SMASH_DEPRECATE_C_FUNCTIONS_H_
#define SMASH_DEPRECATE_NONSTD(fun__)
This macro is used to define functions that are in the C library and in the std namespace.
Definition: action.h:24
FilePtr fopen(const std::filesystem::path &filename, const std::string &mode)
Open a file with given mode.
Definition: file.cc:14