Boost logo

Boost :

Subject: Re: [boost] [type_traits][function_types] Discard param const qualification, bug or feature?
From: Sergey Zhuravlev (sergey4zhuravlev_at_[hidden])
Date: 2013-09-29 17:44:52


Signature type int(int, const std::string) can be used as parameter for
some compiletime algorithm. For example, algorithm that generate new
signature type with optimal transfer arguments int (int, const
std::string&) or generate signature with all argument references int (int&,
const std::string&)
Can't use type_traits, function_types at that cases, because const be
omitted. This will lead to compiletime error, if function with first
signature call function with second signature and use arguments from
function with first signature for this call.

Signature type void(int, const std::string) can use as types tuple for some
compiletime algorithm. Can't use type_traits, function_types, at that case,
because const be lost.

Signature type void(int, const std::string) can use as parentheses dropper
for "types list", e.g. for macro parameter. (int, const std::string) =>
int, const std::string. Can't use type_traits, function_types, at that
case, because const be lost.

I think default behavior is correct, but need parameter for change this
behavior. At least function_types.


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