Boost logo

Boost :

From: Daniel Frey (daniel.frey_at_[hidden])
Date: 2003-02-13 04:38:44


Markus Schöpflin wrote:
>
> Daniel Frey wrote:
>
> > On Wed, 12 Feb 2003 18:37:51 +0100, Markus Schöpflin wrote:
> >
> >> Attached is a small patch for function_base.hpp. On line 302,
> >> there is a T missing.
> >
> > Just a stupid question: Why is it "missing"? What is this patch
> > supposed to fix?
>
> This was the original source:
>
> template<bool, typename> struct enable_if;
> -----------------------^
>
> Visual Age doesn't like this, it needs a name here.
  ^^^^^^^^^^

Ah, that's the reason. But given my recent discomfort about
unmaintainable code, look at it again:

  # if BOOST_WORKAROUND(__HP_aCC, <= 33900)
      template<bool cond, typename T> struct enable_if;
  # else
      template<bool, typename T> struct enable_if;
  # endif

Does this really makes sense? Shouldn't we just keep one version with
names for template parameters? AFAICS this should work for all compilers
and it could be a general boost coding guideline to always provide names
for template parameters. Comments?

Regards, Daniel

-- 
Daniel Frey
aixigo AG - financial training, research and technology
Schloß-Rahe-Straße 15, 52072 Aachen, Germany
fon: +49 (0)241 936737-42, fax: +49 (0)241 936737-99
eMail: daniel.frey_at_[hidden], web: http://www.aixigo.de

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