Boost logo

Boost :

Subject: Re: [boost] Support for BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
From: Robert Ramey (ramey_at_[hidden])
Date: 2013-10-10 14:02:24


Joaquin M Lopez Munoz wrote:
> Stephen Kelly <steveire <at> gmail.com> writes:
>
>>
>> On 10/10/2013 07:48 AM, Joaquin M Lopez Munoz wrote:
>>> Stephen Kelly <steveire <at> gmail.com> writes:
>>>
>>>> On 10/09/2013 12:39 AM, Joaquin M Lopez Munoz wrote:
>>>>> I understand there's been some discussion about dropping support
>>>>> for compliers with BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
>>>>> defined. Has some final decision been made about this?
>>>> What is the question behind the question?
>>> Once the decision is taken, I can get rid of some workarounds in
>>> the Boost libs I maintain.
>>
>> Indeed. I already have patches ready to push which remove the use of
>> the macro throughout boost.
>
> In my case, it's not so much about removing #ifdefs as about
> eliminating workarounds like this:
>
> Instead of
>
> template<typename T> foo<T,type1>{...};
> template<typename T> foo<T,type2>{...};
>
> I'm forced to write
>
> template<typename T> foo_type1{...};
> template<typename T> foo_type2{...};
>
> template<typename T,typename Q>
> struct foo:
> mpl::if_<
> is_same<Q,type1>>,
> foo_type1<T>,
> foo_type2<T>
> >
> {};

Why are you forced to write this? You are not forced to write code
compatible with older compilers. It's only an option. Just write the code
you want and note that your library is not compatible with certain "older"
compilers. Combatibility with non-standard C++ has never been a boost
requirement and this is explicitly stated somewhere on the boost website.

Robert Ramey


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk