This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Idea for more delegations in <algorithm>


Gabriel Dos Reis wrote:

There is always a value passed to the function -- when none is
lexically specified in the source code, the compiler uses the default
value.


The situation is slightly different for empty classes: we and the
compiler know that a value of that type is insignificant.  So, it
could be safely not loaded into the argument list.

For the enable-if stuff, only we (and not the compiler) know that the
default is just a hackery artefact -- except when the function is of
course inline and inlined.


Thanks for the clarification. These considerations, however, make me think
that maybe we should *not* use __enable_if elsewhere, if ever possible... ;)

In implementing tr1/type_traits I avoided completely __enable_if, but only on
a stylistic base, so to speak, lucky guy... ;)


Paolo.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]