Subject: [Boost-bugs] [Boost C++ Libraries] #11014: Inconsistent use of BOOST_PP_VARIADICS_MSVC
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-02-10 23:12:45
#11014: Inconsistent use of BOOST_PP_VARIADICS_MSVC
-------------------------------------------+---------------------------
Reporter: Matthew Collett <m_collett@â¦> | Owner: no-maintainer
Type: Bugs | Status: new
Milestone: To Be Determined | Component: preprocessor
Version: Boost 1.57.0 | Severity: Cosmetic
Keywords: |
-------------------------------------------+---------------------------
Clang generates multiple warnings of the form
{{{
'BOOST_PP_VARIADICS_MSVC' is not defined, evaluates to 0
}}}
In `config/config.hpp`, `BOOST_PP_VARIADICS_MSVC` is either set to 1 or
left undefined, but the following files test the //value// of
`BOOST_PP_VARIADICS_MSVC`, triggering the above warning when the macro is
undefined:
{{{
seq/detail/binary_transform.hpp
tuple/elem.hpp
variadic/elem.hpp
array/detail/get_data.hpp
punctuation/is_begin_parens.hpp
punctuation/detail/is_begin_parens.hpp
facilities/is_empty_variadic.hpp
facilities/detail/is_empty.hpp
tuple/detail/is_single_return.hpp
variadic/detail/is_single_return.hpp
tuple/rem.hpp
tuple/reverse.hpp
tuple/size.hpp
variadic/size.hpp
list/to_array.hpp
tuple/to_array.hpp
variadic/to_array.hpp
tuple/to_list.hpp
tuple/to_seq.hpp
test/tuple.cxx
}}}
Suggested fix: change all the above to use `#ifdef` or `defined` to test
the //existence// of `BOOST_PP_VARIADICS_MSVC` instead of the value. (A
global replacement of `BOOST_PP_VARIADICS_MSVC` by
`defined(BOOST_PP_VARIADICS_MSVC)` would be effective, if not elegant.)
Alternate fix: change `config/config.hpp` so that
`BOOST_PP_VARIADICS_MSVC` is either set to 1 or set to 0.
In that case, the following files, which do currently test the existence
of `BOOST_PP_VARIADICS_MSVC` (using `defined`), will need to be changed to
test the value:
{{{
test/facilities.cxx
test/isempty_variadic_standard_failure.cxx
test/isempty_variadic_standard_failure2.cxx
test/isempty.cxx
}}}
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/11014> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:17 UTC