Opened 6 years ago

Closed 6 years ago

#12236 closed Tasks (wontfix)

BOOST_VARIANT_DO_NOT_USE_VARIADIC_TEMPLATES for msvc 2015

Reported by: fsmoke@… Owned by: Antony Polukhin
Milestone: To Be Determined Component: variant
Version: Boost 1.60.0 Severity: Problem
Keywords: Cc:

Description

Ealier i heard that msvc compiler has bugs around variadic templates(error like 'not enough template arguments') I tried to remove _MSC_VER checks on my vs2015 update 2 and i have got compile result without any errors. May be it's time to change this condition. Because very uncomfortably to use variant with limited quantity of template arguments.

#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) \

/*
(!defined(clang) && defined(GNUC) && (GNUC == 4) && (GNUC_MINOR < 7)) \
(defined(_MSC_VER) && (_MSC_VER <= 1900))*/ \
defined(BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE) \
defined (BOOST_VARIANT_NO_TYPE_SEQUENCE_SUPPORT)

Change History (5)

comment:1 by fsmoke@…, 6 years ago

Sorry '/*' wrongly moved out is must be around /*(defined(_MSC_VER) && (_MSC_VER <= 1900))*/

comment:2 by anonymous, 6 years ago

oh variant based on mpl - why?

#if !defined(BOOST_VARIANT_DO_NOT_USE_VARIADIC_TEMPLATES)

template < typename... T > struct make_variant_list {

typedef typename mpl::list< T... >::type type;

};

#else defined(BOOST_VARIANT_DO_NOT_USE_VARIADIC_TEMPLATES)

so it's check is irrelevant cos we has limitation of mpl :( (20 arguments by default)

so i have another question - when limitations will be removed?

comment:3 by Antony Polukhin, 6 years ago

Owner: changed from ebf to Antony Polukhin

I do not have access to the latest msvc2015 right now. Could you apply your patch and run all the tests from boost_root/libs/variant/test. Just go to that folder and run ..\..\..\b2 from it.

If everything is OK, than it's a good sign not to increment 1900 next time :) Unfortunately it's impossible to enable variadics for _MSC_VER == 1900, because there's no known to me way to distinguish vs2015 update 2 from older versions (update 1 and before) and Boost must be able to run on any compiler.

oh variant based on mpl - why?

Variant was created long before variadic templates appeared. Since then variant uses MPL.

when limitations will be removed?

When Boost.MPL will be transfered to variadic templates. That's a big task and nobody has time or will to do it right now. However pull requests are always welcomed ;)

in reply to:  3 comment:4 by fsmoke@…, 6 years ago

Replying to apolukhin:

I do not have access to the latest msvc2015 right now. Could you apply your patch and run all the tests from boost_root/libs/variant/test. Just go to that folder and run ..\..\..\b2 from it.

I'll try to do this as soon as posible

If everything is OK, than it's a good sign not to increment 1900 next time :) Unfortunately it's impossible to enable variadics for _MSC_VER == 1900, because there's no known to me way to distinguish vs2015 update 2 from older versions (update 1 and before) and Boost must be able to run on any compiler.

May be you can try _MSC_FULL_VER instead of _MSC_VER

When Boost.MPL will be transfered to variadic templates. That's a big task and nobody has time or will to do it right now. However pull requests are always welcomed ;)

Yeah it's great job to do this. But i heard new standard will contain std::variant

comment:5 by Antony Polukhin, 6 years ago

Resolution: wontfix
Status: newclosed
Last edited 6 years ago by Antony Polukhin (previous) (diff)
Note: See TracTickets for help on using tickets.