Thrill  0.1
attribute_format_printf.hpp
Go to the documentation of this file.
1 /*******************************************************************************
2  * tlx/define/attribute_format_printf.hpp
3  *
4  * Part of tlx - http://panthema.net/tlx
5  *
6  * Copyright (C) 2015-2017 Timo Bingmann <[email protected]>
7  *
8  * All rights reserved. Published under the Boost Software License, Version 1.0
9  ******************************************************************************/
10 
11 #ifndef TLX_DEFINE_ATTRIBUTE_FORMAT_PRINTF_HEADER
12 #define TLX_DEFINE_ATTRIBUTE_FORMAT_PRINTF_HEADER
13 
14 namespace tlx {
15 
16 //! \addtogroup tlx_define
17 //! \{
18 
19 /******************************************************************************/
20 // __attribute__ ((format(printf, #, #))
21 
22 #if defined(__GNUC__) || defined(__clang__)
23 #define TLX_ATTRIBUTE_FORMAT_PRINTF(X, Y) \
24  __attribute__ ((format(printf, X, Y))) // NOLINT
25 #else
26 #define TLX_ATTRIBUTE_FORMAT_PRINTF(X, Y)
27 #endif
28 
29 //! \}
30 
31 } // namespace tlx
32 
33 #endif // !TLX_DEFINE_ATTRIBUTE_FORMAT_PRINTF_HEADER
34 
35 /******************************************************************************/