Skip to content

Commit 8762680

Browse files
committed
fixed -Wlifetime-safety-intra-tu-suggestions CLang warnings
disabled `-Wlifetime-safety-intra-tu-suggestions` Clang warning for now
1 parent 9089489 commit 8762680

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

simplecpp.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,16 @@
4545
# include <sys/types.h>
4646
#endif
4747

48+
#if defined(__has_cpp_attribute)
49+
# if __has_cpp_attribute (clang::lifetimebound)
50+
# define SIMPLECPP_LIFETIMEBOUND [[clang::lifetimebound]]
51+
# else
52+
# define SIMPLECPP_LIFETIMEBOUND
53+
# endif
54+
#else
55+
# define SIMPLECPP_LIFETIMEBOUND
56+
#endif
57+
4858
#if defined(_MSC_VER)
4959
# pragma warning(push)
5060
// suppress warnings about "conversion from 'type1' to 'type2', possible loss of data"

0 commit comments

Comments
 (0)