|
Boost : |
From: Thorsten Ottosen (nesotto_at_[hidden])
Date: 2004-12-22 08:29:50
Hi,
The following trait is supposed to make it easier to forward
arguments in generic code and in particular string literals. For example, I
will use it when I update boost.assign
to use const T& arguments instead of T arguments. It could also be used to
make a better version of std::make_pair():
template< class F, class S >
inline std::pair< typename decayed<F>::type,
typename decayed<S>::type >
make_pair( const F& f, const S& s )
{
return std::pair< typename decayed<F>::type,
typename decayed<S>::type >( f, s );
}
Any thoughts from the type_traits authors?
Do anybody mind if I add this to the cvs and make some docs for the
type-traits library?
br
-Thorsten
begin 666 decayed.cpp
M(VEN8VQU9&4@/&)O;W-T+W)A;F=E+W9A;'5E7W1Y<&4N:'!P/@T*(VEN8VQU
M9&4@/&)O;W-T+W1Y<&5?=')A:71S+VES7V%R<F%Y+FAP<#X-"B-I;F-L=61E
M(#QB;V]S="]M<&PO979A;%]I9BYH<' ^#0HC:6YC;'5D92 \8F]O<W0O;7!L
M+VED96YT:71Y+FAP<#X-"B-I;F-L=61E(#QU=&EL:71Y/@T*#0IN86UE<W!A
M8V4_at_8F]O<W0-"GL-"B @("!N86UE<W!A8V4_at_9&5C87EE9%]D971A:6P-"B @
M("![#0H@(" @(" @('1E;7!L871E/"!C;&%S<R!4(#X-"B @(" @(" @<W1R
M=6-T(')A;F=E7W!O:6YT97(-"B @(" @(" @>PT*(" @(" @(" @(" @='EP
M961E9B!C;VYS="!T>7!E;F%M92!R86YG95]V86QU93Q4/CHZ='EP92H@='EP
M93L-"B @(" @(" @?3L-"B @("!]#0H@(" @#0H@(" @=&5M<&QA=&4\(&-L
M87-S(%0@/@T*(" @('-T<G5C="!D96-A>65D#0H@(" @>PT*(" @(" @("!T
M>7!E9&5F('1Y<&5N86UE(&UP;#HZ979A;%]I9E]C/"!I<U]A<G)A>3Q4/CHZ
M=F%L=64L#0H@(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @
M(" @(&1E8V%Y961?9&5T86EL.CIR86YG95]P;VEN=&5R/%0^+ T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T9#HZ<&%I<CQS=&0Z
M.G-T<FEN9RP@:6YT/B @(" @(" @<#(@/2!B;V]S=#HZ;6%K95]P86ER*" B
M9F]O(BP@,2 I.PT*#0H@(" @<W1D.CIP86ER/'-T9#HZ=W-T<FEN9RQS=&0Z
M.G-T<FEN9SX@<#,@(#T_at_8F]O<W0Z.FUA:V5?<&%I<B@@3")F;V\B+" B8F%R
M(B I.PT*(" @('-T9#HZ<&%I<CQS=&0Z.G=S=')I;F<L(&EN=#X@(" @(" @
M(' T(" ](&)O;W-T.CIM86ME7W!A:7(H($PB9F]O(BP@,2 I.PT*#0HO+R @
M("!I;G0_at_87)R87E;,3!=.PT*+R\@(" @<W1D.CIP86ER/&EN="HL:6YT*CX@
M<#4@/2!B;V]S=#HZ;6%K95]P86ER*"!A<G)A>2P_at_87)R87D@*3L-"@T*?0T*
`
end
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk