Is your feature request related to a problem? Please describe.
The lack of auto makes it impossible to define the following very useful function
template<typename DfDu_t, typename DuDx_t>
auto applyChainRule(const DfDu_t DfDu, const DuDx_t DuDx)
{
return DfDu*DuDx;
}
as it stands right now I have to provide a manual overload or specialization for every floatNxP floatPxM combo.
Also because there are no constructors, the code gets really long and redundant.
template<class A, class B, class C>
struct MyReallyVeryLongNamedStruct
{
static MyReallyVeryLongNamedStruct<A,B,C> create();
};
void main()
{
MyReallyVeryLongNamedStruct<SomethingA,AnotherB,OtherC> annoyingVariableToShowcase = MyReallyVeryLongNamedStruct<SomethingA,AnotherB,OtherC>::create();
}
Describe the solution you'd like
Being able to use auto for when:
- return type
- variable type due to assignment
can already be deduced trivially.
Describe alternatives you've considered
I could make an ugly template struct with and internal using alias which tells me the resulting type of every matrix multiplication.
template<typename DfDu_t, typename DuDx_t>
impl::matrix_mul<DfDu_t,DuDx_t>::result_t applyChainRule(const DfDu_t DfDu, const DuDx_t DuDx)
{
return DfDu*DuDx;
}
But that shifts the problem of having to do the manual specialization onto a struct.
Also that doesn't scale well to other things.
Is your feature request related to a problem? Please describe.
The lack of
automakes it impossible to define the following very useful functionas it stands right now I have to provide a manual overload or specialization for every
floatNxPfloatPxMcombo.Also because there are no constructors, the code gets really long and redundant.
Describe the solution you'd like
Being able to use
autofor when:can already be deduced trivially.
Describe alternatives you've considered
I could make an ugly
template structwith and internalusingalias which tells me the resulting type of every matrix multiplication.But that shifts the problem of having to do the manual specialization onto a struct.
Also that doesn't scale well to other things.