mirror of
https://github.com/boostorg/core.git
synced 2025-11-28 21:30:09 +01:00
[core] Add/improve ignore_unused() function specifiers.
Add C++14 constexpr by BOOST_CXX14_CONSTEXPR. Replace inline with BOOST_FORCEINLINE.
This commit is contained in:
@@ -6,6 +6,12 @@
|
||||
|
||||
#include <boost/core/ignore_unused.hpp>
|
||||
|
||||
BOOST_CXX14_CONSTEXPR int test_fun(int a)
|
||||
{
|
||||
boost::ignore_unused(a);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
{
|
||||
@@ -60,5 +66,10 @@ int main()
|
||||
boost::ignore_unused<a, b, c, d, e>();
|
||||
}
|
||||
|
||||
{
|
||||
BOOST_CXX14_CONSTEXPR const int a = test_fun(0);
|
||||
boost::ignore_unused(a);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user