Add BOOST_ATTRIBUTE_NODISCARD.

See https://github.com/boostorg/config/issues/258.
This commit is contained in:
jzmaddock committed 2019-04-01 19:30:31 +01:00
1 parent d112744885
commit 85b4600817
3 files changed
+16

No files matched your search

+3
View File
@@ -37,6 +37,8 @@ BOOST_NORETURN void always_throw()
struct BOOST_MAY_ALIAS aliasing_struct {};
typedef unsigned int BOOST_MAY_ALIAS aliasing_uint;
struct BOOST_ATTRIBUTE_NODISCARD nodiscard_struct {};
#define test_fallthrough(x) foobar(x)
@@ -53,6 +55,7 @@ int main()
result += never_inline(3);
if(BOOST_UNLIKELY(!result))
always_throw();
nodiscard_struct s;
}
catch(int)
{