[Bug c++/94255] template specialization in different namespace causes crash
vince.a.bridgers at gmail dot com
gcc-bugzilla@gcc.gnu.org
Sun Mar 22 00:10:32 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94255
--- Comment #1 from Vince Bridgers <vince.a.bridgers at gmail dot com> ---
The corrected code successfully compiles. Basically, making sure the template
specialization is in the correct namespace.
namespace clang {
class DynTypedNode {
private:
template <typename T, typename EnablerT = void> struct BaseConverter;
template <typename T> struct ValueConverter {};
};
namespace ast_type_traits {
using DynTypedNode = ::clang::DynTypedNode;
}; // end namespace ast_type_traits
}; // end namespace clang
namespace clang {
//namespace ast_type_traits {
template <> struct DynTypedNode::BaseConverter<int, void> : public
ValueConverter<int> {};
//}; // end namespace ast_type_traits
}; // end namespace clang
int main(void) {
return 0;
}
More information about the Gcc-bugs
mailing list