P
Peng Yu
Hi,
Suppose I have two namespaces A and B, I'm wondering if I can define a
class in B for A. The question is relevant when I want to specialize
some classes that have been defined in the std:: namespace. For
example, I have the following code
namespace my {
....
some code // it needs the specialized version of
std::less<std::complex<T> >
....
}
If I specialize std::less<std::complex<T> > in std::, it will be
effective for any namespace. However, I only want it be effective for
namespace my. I'm wondering if it is possible?
Thanks,
Peng
Suppose I have two namespaces A and B, I'm wondering if I can define a
class in B for A. The question is relevant when I want to specialize
some classes that have been defined in the std:: namespace. For
example, I have the following code
namespace my {
....
some code // it needs the specialized version of
std::less<std::complex<T> >
....
}
If I specialize std::less<std::complex<T> > in std::, it will be
effective for any namespace. However, I only want it be effective for
namespace my. I'm wondering if it is possible?
Thanks,
Peng