【发布时间】:2014-08-31 17:46:49
【问题描述】:
使用以下代码我收到警告:
warning: specialization of ‘template<class _Iterator> struct std::iterator_traits’ in different namespace [-fpermissive]
template<> class std::iterator_traits<Token_ptr>{
public:
typedef Word difference_type;
typedef Word value_type;
typedef Token_ptr pointer;
typedef Word& reference ;
typedef std::bidirectional_iterator_tag iterator_category ;
};
虽然一切正常,但是否有人知道发出警告的确切含义以及发出警告的原因。 (g++ 发出警告,而 clang++ 没有)。
【问题讨论】:
-
这似乎与this question中报告的问题相同。
标签: c++