Opened 8 years ago

Closed 7 years ago

#11014 closed Bugs (fixed)

Inconsistent use of BOOST_PP_VARIADICS_MSVC

Reported by: Matthew Collett <m_collett@…> Owned by: No-Maintainer
Milestone: To Be Determined Component: preprocessor
Version: Boost 1.57.0 Severity: Cosmetic
Keywords: Cc:

Description

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

Change History (3)

comment:1 by Edward Diener, 7 years ago

This has been fixed in the 'develop' branch of preprocessor library.

comment:2 by Edward Diener, 7 years ago

This has now been fixed in the latest Boost 1.59 release.

comment:3 by Edward Diener, 7 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.