boostorg / container

STL-like containers from Boost
http://www.boost.org/libs/container/
Boost Software License 1.0
101 stars 113 forks source link

unused parameter warning when compiling with assertions disabled #56

Closed viboes closed 6 years ago

viboes commented 6 years ago

There are some functions here that would need to mask this warning

https://github.com/boostorg/container/blob/6a9e46ed6e5e8b1e24c5d9be7b2d6e52c9485fe0/include/boost/container/throw_exception.hpp#L60

Please could you silent these warnings?

igaztanaga commented 6 years ago

Ok, can you please tell me what the warning says, with which compiler?

viboes commented 6 years ago

I got it at work with a TI.

When BOOST_ASSERT_MSG(!"boost::container out_of_range thrown", str);is nothing, the variable str is not used.

I can try to get the exact message and the exact compiler version, but I don't think this is specific to this compiler.

igaztanaga commented 6 years ago

Let's see if commit:

https://github.com/boostorg/container/commit/520dd7cbddfa26245edea719d52161e14e41fa95

fixes the problem.

igaztanaga commented 6 years ago

Trying to refine it further in commit:

https://github.com/boostorg/container/commit/407aabd77bd5e1080394e5519b1061f27f2b7130

igaztanaga commented 6 years ago

Closing it as fixed.

viboes commented 6 years ago

Gracias