In this code:
// decomplexify ---------------------------------------------------------------
template <typename T>
struct decomplexify
{
typedef T type;
};
template <typename ELT>
struct decomplexify<std::complex<ELT> >
{
typedef ELT type;
};
It appears the partial specialization will work for
decomplexify<std::complex<T>>,
but not
decomplexify<std::complex<T>&>
This is on gcc (GCC) 4.9.2 20141101 (Red Hat 4.9.2-1)
Does this seem expected behavior? Is there a workaround (other than a redundant specialization for std::complex&?)