C ++ 11のバージョンは、名前空間の実施形態特バグ機能の単一ラインを使用することはできません

警告:の専門別の名前空間の 'テンプレート<クラス_Iterator>構造体のstd ::にiterator_traits' [-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 ++の問題警告打ち鳴らすが++そうではありません)。

https://stackoverflow.com/questions/25594644/warning-specialization-of-template-in-different-namespace
バグの// GCCコンパイラプロセス・テンプレートの特殊化、あなただけの名前空間で、ここで、単一の行を使用してはいけません名前空間の中括弧を使用して

おすすめ

転載: www.cnblogs.com/dongzhiquan/p/11939403.html