VC

Visual studio 2008 SP1

VC

.NET Framework 3.5 SP1 がインストールエラーになる。(T_T) とりあえず、諦める。

Visual Studio 2008 Express Editions 日本語版

VC

http://www.microsoft.com/japan/msdn/vstudio/ ダウンロード可能になっているな。 今年中にインストールしよう。 VC++にバグがあるみたいだし、2005も残しておくべきかな。 ディスクの残り容量も少なくなっているし、コマンドライン環境だけでも残しておき…

共変の戻り値型

東方算程譚 こばりあんすより、 私も書いてみた。 class VB { public: virtual VB* create() { return new VB; } }; class LB:public virtual VB { public: virtual LB* create() { return new LB; } }; class RB:public virtual VB { public: virtual RB* c…

文字化演算子

VC

昨日のVCのfor each拡張で思い出した。 VCには、プリプロセス時に引数を文字化する演算子 #@ が存在する。 #define C(X) #@X int main(int argc, char *argv[]) { printf("%c\n", C(A)); // 'A'を出力 return 0; } 標準規格内で、最も近い効果を得るには、以…

for each

VC

うっそぉ〜ん!より、 #include <iostream> #include <list> #include <string> int main() { std::list<std::string> sl; sl.push_back("1st"); sl.push_back("2nd"); sl.push_back("3rd"); sl.push_back("4th"); for each ( std::string item in sl ) { // Ω ΩΩ < な、なんだってー std::cout <<</std::string></string></list></iostream>…

本日のバグ

VC

昨日のバグの逆ヴァージョン発見。アクセス可能なはずのoperator deleteを呼び出せない。 #include <cstdlib> struct base { void* operator new(std::size_t n) { return std::malloc(n); } void operator delete(void* p) { std::free(p); } }; class deriv: base {</cstdlib>…

本日のバグ

以下のコードがVCでコンパイルできねぇ! #include <cstddef> struct A { int x,y; }; template <class X> struct C { int x :offsetof(X,y); }; int main() { C<A> x; } こんなコード書くなよ。>俺</a></class></cstddef>

Visual Studio 2005 Service Pack 1

http://www.microsoft.com/japan/msdn/vstudio/downloads/sp/vs2005/sp1/ とりあえずいれておく。

今日遭遇したバグ

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19809このバグはVCの以下のバグについて調査しているときに遭遇 template class foo { template friend void prod(const foo&); }; template void prod(const foo&s) { } int main() { foo x; prod(x); return …