Mercurial > hg > vamp-build-and-test
annotate DEPENDENCIES/generic/include/boost/log/utility/unused_variable.hpp @ 133:4acb5d8d80b6 tip
Don't fail environmental check if README.md exists (but .txt and no-suffix don't)
author | Chris Cannam |
---|---|
date | Tue, 30 Jul 2019 12:25:44 +0100 |
parents | c530137014c0 |
children |
rev | line source |
---|---|
Chris@16 | 1 /* |
Chris@101 | 2 * Copyright Andrey Semashev 2007 - 2015. |
Chris@16 | 3 * Distributed under the Boost Software License, Version 1.0. |
Chris@16 | 4 * (See accompanying file LICENSE_1_0.txt or copy at |
Chris@16 | 5 * http://www.boost.org/LICENSE_1_0.txt) |
Chris@16 | 6 */ |
Chris@16 | 7 /*! |
Chris@16 | 8 * \file unused_variable.hpp |
Chris@16 | 9 * \author Andrey Semashev |
Chris@16 | 10 * \date 10.05.2008 |
Chris@16 | 11 * |
Chris@16 | 12 * The header contains definition of a macro to suppress compiler warnings about unused variables. |
Chris@16 | 13 */ |
Chris@16 | 14 |
Chris@16 | 15 #ifndef BOOST_LOG_UTILITY_UNUSED_VARIABLE_HPP_INCLUDED_ |
Chris@16 | 16 #define BOOST_LOG_UTILITY_UNUSED_VARIABLE_HPP_INCLUDED_ |
Chris@16 | 17 |
Chris@16 | 18 #include <boost/log/detail/config.hpp> |
Chris@16 | 19 |
Chris@16 | 20 #ifdef BOOST_HAS_PRAGMA_ONCE |
Chris@16 | 21 #pragma once |
Chris@16 | 22 #endif |
Chris@16 | 23 |
Chris@16 | 24 #if defined(__GNUC__) |
Chris@16 | 25 |
Chris@16 | 26 //! The macro suppresses compiler warnings for \c var being unused |
Chris@16 | 27 #define BOOST_LOG_UNUSED_VARIABLE(type, var, initializer) __attribute__((unused)) type var initializer |
Chris@16 | 28 |
Chris@16 | 29 #else |
Chris@16 | 30 |
Chris@16 | 31 namespace boost { |
Chris@16 | 32 |
Chris@16 | 33 BOOST_LOG_OPEN_NAMESPACE |
Chris@16 | 34 |
Chris@16 | 35 namespace aux { |
Chris@16 | 36 |
Chris@16 | 37 template< typename T > |
Chris@101 | 38 BOOST_FORCEINLINE void no_unused_warnings(T const&) BOOST_NOEXCEPT {} |
Chris@16 | 39 |
Chris@16 | 40 } // namespace aux |
Chris@16 | 41 |
Chris@16 | 42 BOOST_LOG_CLOSE_NAMESPACE // namespace log |
Chris@16 | 43 |
Chris@16 | 44 } // namespace boost |
Chris@16 | 45 |
Chris@16 | 46 //! The macro suppresses compiler warnings for \c var being unused |
Chris@16 | 47 #define BOOST_LOG_UNUSED_VARIABLE(type, var, initializer) type var initializer; ::boost::log::aux::no_unused_warnings(var) |
Chris@16 | 48 |
Chris@16 | 49 #endif |
Chris@16 | 50 |
Chris@16 | 51 #endif // BOOST_LOG_UTILITY_UNUSED_VARIABLE_HPP_INCLUDED_ |