[Bug libstdc++/51083] gnu++0x: resolving overloaded functions belonging to different namespaces
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Nov 10 19:04:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51083
--- Comment #8 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-11-10 19:01:10 UTC ---
reduced
#include <complex>
namespace a
{
template<typename> class Mat { };
typedef std::complex<double> cx_double;
typedef Mat<cx_double> cx_mat;
template<typename T>
struct Mat2
{
Mat2(Mat<T>) { }
};
struct Res { };
template<typename T>
Res
imag(Mat2<T>)
{
return Res();
}
}
using namespace a;
using namespace std;
int main()
{
cx_mat c;
Res res = imag(c);
}
imag.cc: In function ‘int main()’:
imag.cc:34:19: error: conversion from
‘__gnu_cxx::__promote<a::Mat<std::complex<double> >, false>::__type {aka
a::Mat<std::complex<double> >}’ to non-scalar type ‘a::Res’ requested
More information about the Gcc-bugs
mailing list