2013-04-14 07:51:19 +00:00
|
|
|
#ifndef SPROUT_COMPLEX_UDL_HPP
|
|
|
|
#define SPROUT_COMPLEX_UDL_HPP
|
|
|
|
|
|
|
|
#include <sprout/config.hpp>
|
|
|
|
#include <sprout/complex/complex.hpp>
|
|
|
|
|
|
|
|
#if SPROUT_USE_USER_DEFINED_LITERALS
|
|
|
|
|
|
|
|
namespace sprout {
|
|
|
|
namespace udl {
|
|
|
|
namespace complex {
|
|
|
|
//
|
|
|
|
// _i
|
|
|
|
//
|
|
|
|
inline SPROUT_CONSTEXPR sprout::complex<double>
|
|
|
|
operator"" _i(long double x) {
|
|
|
|
return sprout::complex<double>(0, x);
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
2013-05-11 14:57:15 +00:00
|
|
|
// _i_f
|
|
|
|
// _i_F
|
2013-04-14 07:51:19 +00:00
|
|
|
//
|
|
|
|
inline SPROUT_CONSTEXPR sprout::complex<float>
|
2013-05-11 14:57:15 +00:00
|
|
|
operator"" _i_f(long double x) {
|
2013-04-14 07:51:19 +00:00
|
|
|
return sprout::complex<float>(0, x);
|
|
|
|
}
|
|
|
|
inline SPROUT_CONSTEXPR sprout::complex<float>
|
2013-05-11 14:57:15 +00:00
|
|
|
operator"" _i_F(long double x) {
|
2013-04-14 07:51:19 +00:00
|
|
|
return sprout::complex<float>(0, x);
|
|
|
|
}
|
|
|
|
|
|
|
|
//
|
|
|
|
// _il
|
|
|
|
// _iL
|
|
|
|
//
|
|
|
|
inline SPROUT_CONSTEXPR sprout::complex<long double>
|
|
|
|
operator"" _il(long double x) {
|
|
|
|
return sprout::complex<long double>(0, x);
|
|
|
|
}
|
|
|
|
inline SPROUT_CONSTEXPR sprout::complex<long double>
|
|
|
|
operator"" _iL(long double x) {
|
|
|
|
return sprout::complex<long double>(0, x);
|
|
|
|
}
|
|
|
|
} // namespace complex
|
|
|
|
|
|
|
|
using sprout::udl::complex::operator"" _i;
|
2013-05-11 14:57:15 +00:00
|
|
|
using sprout::udl::complex::operator"" _i_f;
|
|
|
|
using sprout::udl::complex::operator"" _i_F;
|
2013-04-14 07:51:19 +00:00
|
|
|
using sprout::udl::complex::operator"" _il;
|
|
|
|
using sprout::udl::complex::operator"" _iL;
|
|
|
|
} // namespace udl
|
|
|
|
|
|
|
|
using sprout::udl::complex::operator"" _i;
|
2013-05-11 14:57:15 +00:00
|
|
|
using sprout::udl::complex::operator"" _i_f;
|
|
|
|
using sprout::udl::complex::operator"" _i_F;
|
2013-04-14 07:51:19 +00:00
|
|
|
using sprout::udl::complex::operator"" _il;
|
|
|
|
using sprout::udl::complex::operator"" _iL;
|
|
|
|
} // namespace sprout
|
|
|
|
|
|
|
|
#endif // #if SPROUT_USE_USER_DEFINED_LITERALS
|
|
|
|
|
|
|
|
#endif // #ifndef SPROUT_COMPLEX_UDL_HPP
|