Skip to content

Commit 78bb865

Browse files
authored
Merge pull request #437 from boostorg/436
Add additional paths to guarantee BOOST_TEST_PRIxPTR is defined
2 parents 0cef47a + cc04b75 commit 78bb865

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

include/boost/test/impl/execution_monitor.ipp

+12-1
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,18 @@ namespace { void _set_se_translator( void* ) {} }
207207
# ifdef BOOST_TEST_DEFINED_STDC_FORMAT_MACROS
208208
# undef __STDC_FORMAT_MACROS
209209
# endif
210-
#else
210+
#endif
211+
// If any modern toolchain did not pick up a definition from above it will here
212+
#ifndef BOOST_TEST_PRIxPTR
213+
# ifdef __has_include
214+
# if __has_include(<cinttypes>)
215+
# include <cinttypes>
216+
# define BOOST_TEST_PRIxPTR PRIxPTR
217+
# endif
218+
# endif
219+
#endif
220+
// Last resort
221+
#ifndef BOOST_TEST_PRIxPTR
211222
# define BOOST_TEST_PRIxPTR "08lx"
212223
#endif
213224

0 commit comments

Comments
 (0)