Modify

Opened 13 months ago

Closed 5 months ago

#12236 closed Tasks (wontfix)

BOOST_VARIANT_DO_NOT_USE_VARIADIC_TEMPLATES for msvc 2015

Reported by: fsmoke@… Owned by: apolukhin
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)

Attachments (0)

Change History (5)

comment:1 Changed 13 months ago by fsmoke@…

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

comment:2 Changed 13 months ago by anonymous

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 follow-up: Changed 13 months ago by apolukhin

  • Owner changed from ebf 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.

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 ;)

comment:4 in reply to: ↑ 3 Changed 13 months ago by fsmoke@…

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 Changed 5 months ago by apolukhin

  • Resolution set to wontfix
  • Status changed from new to closed
Last edited 5 months ago by apolukhin (previous) (diff)

Add Comment

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain apolukhin.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.