Commit bd8f233b authored by Alexandre Janniaux's avatar Alexandre Janniaux Committed by Hugo Beauzée-Luyssen
Browse files

vlc_fixup: fix usage of typeof from C++

Replace typeof by a decltype()-based equivalent on compilers not
supporting typeof.

Decltype is not equivalent to typeof, but we are mostly concerned about
removing references from the type, since it has no use in C code like
VLC list.

Note that this fixup is there to fix the usage of headers using typeof
in C++ code, not to provide "typeof" directly C++ to replace decltype.
parent 784c3245
......@@ -684,4 +684,11 @@ int clock_nanosleep(clockid_t clock_id, int flags,
} /* extern "C" */
#if defined(__cplusplus)
# include <type_traits>
# define typeof(t) std::remove_reference<decltype(t)>::type
#endif /* !LIBVLC_FIXUPS_H */
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment