extern "C++"
Windows Driver Kit for Windows 7 and Windows Server 2008 R2
をよく見ると、
extern "C++"
というのがある。これは何ですか・・・。理屈から言うと、
extern "C" { // ここはC extern "C++" { // ここはC++ } }
という感じで、入れ子にして、Cのコードの中でも、C++のコードを使いたい場合にはつじつま合わせとしては必要になる。ただ、普通に考えて、これが必要なのは、
extern "C" { #include "someheader.h" }
といった感じで、このヘッダ、C++対応できてないから、Cのリンケージ指定しちゃえ的な扱いを受けたヘッダだけだと思われる。
で、これは、マイクロソフトの独自拡張?
Using extern to Specify Linkage (Visual C++ Language Reference)
には、単に、
Microsoft C++ supports the strings "C" and "C++" in the string-literal field. All of the standard include files use the extern "C" syntax to allow the run-time library functions to be used in C++ programs.
としか書いてない。
まぁ、普通は使うことはないからいいか。