
"Andy Little" <andy@servocomm.freeserve.co.uk> wrote
"Andy Little" <andy@servocomm.freeserve.co.uk> wrote
I believe some parts of pqs may be just what I need for some other
"Neal D. Becker" <ndbecker2@verizon.net> wrote purposes.
[snip]
particularly since it appears to include std::complex.
reviewing my work for binary_operation with regard to complex. I think
the following covers it as far as the definition goes. Not tested
that thoroughly Oops nearly... I think following does the job( required complex,Op,value_type and value_type,Op,complex too)
regards Andy Little
----------------------------------
#ifndef GENERIC_COMPLEX_BINARY_OPERATION_HPP_INCLUDED #define GENERIC_COMPLEX_BINARY_OPERATION_HPP_INCLUDED #include "boost/pqs/meta/binary_operation.hpp" #include <complex> namespace boost{namespace pqs{ namespace meta{ template< typename Value_typeL, template <typename> class Op, typename Value_typeR > struct binary_operation< typename std::complex< Value_typeL >, Op, typename std::complex< Value_typeR > >{ typedef typename std::complex< typename binary_operation< Value_typeL, Op, Value_typeR >::result_type > result_type; }; template< typename Value_typeL, template <typename> class Op, typename Value_typeR > struct binary_operation< typename std::complex< Value_typeL >, Op, Value_typeR >{ typedef typename std::complex< typename binary_operation< Value_typeL, Op, Value_typeR >::result_type > result_type; }; template< typename Value_typeL, template <typename> class Op, typename Value_typeR > struct binary_operation< Value_typeL, Op, typename std::complex< Value_typeR > >{ typedef typename std::complex< typename binary_operation< Value_typeL, Op, Value_typeR >::result_type > result_type; }; }}}//boost::pqs::meta #endif