以下代码中两条标记行之间有什么区别?我recived这两个typedefs有什么区别?
template <const char *N> struct A {
static const char *p;
};
template <class T> struct B {
static const char c[1];
typedef A<B<T>::c> C; // <---
// typedef A<c> C; // <---
};
错误是:
test_t.C: In instantiation of 'const char B::c [1]':
test_t.C:7: instantiated from here
test_t.C:7: internal compiler error: in instantiate_decl, at cp/pt.c:15628
Please submit a full bug report,
with preprocessed source if appropriate.
See http://gcc.gnu.org/bugs.html for instructions.
为什么人们坚持用[tag:c]标记标记问题,当它明显不能是C代码时,因为它使用了模板之类的东西? –
我相当确定没有区别。你为什么认为有一个? –
@ R.MartinhoFernandes,我敢肯定这是因为整个“C/C++”废话。 – Griwes