{"description":"\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u306b\u5f15\u6570\u304c\u3042\u308b\u3068\u304d\u3055\u3089\u306b\u554f\u984c\u304c\u3042\u3063\u305f\uff0e import std.stdio; struct X { static X opCall(int i) // \u3053\u3044\u3064\u306e\u305b\u3044\uff0e\u30ed\u30fc\u30ab\u30eb\u5909\u6570\u3092\u5916\u306b\u51fa\u305b\u306a\u3044\u306e\u3067\u623b\u308a\u5024\u578b\u3092ref const\u306b\u3082\u3067\u304d\u306a\u3044 { X x; return x; } // this(int i) // \u3053\u3046\u3057\u307e\u3057\u3087\u3046 // { // } } ref const(X) f() { return X(1); // Error: opCall(1) is not an lvalue } void main() { writeln(f()); } \u3055\u3063\u304d\u306e\u554f\u984c\u3068\u5408\u308f\u3055\u3063\u3066\u9b31\u9676\u3057\u3044\u3053\u3068\u2026","provider_name":"Hatena Blog","categories":["D\u8a00\u8a9e"],"blog_title":"...ing logging 4.0","author_name":"haru-s","version":"1.0","provider_url":"https://hatena.blog","image_url":null,"type":"rich","width":"100%","height":"190","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fharu-s.hatenablog.com%2Fentry%2F20100101%2F1262317909\" title=\"rvalue\u306fconst ref\u3067\u53d7\u3051\u53d6\u308c\u306a\u3044 (2) - dmd 2.038 - ...ing logging 4.0\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","url":"https://haru-s.hatenablog.com/entry/20100101/1262317909","blog_url":"https://haru-s.hatenablog.com/","author_url":"https://blog.hatena.ne.jp/haru-s/","title":"rvalue\u306fconst ref\u3067\u53d7\u3051\u53d6\u308c\u306a\u3044 (2) - dmd 2.038","published":"2010-01-01 12:51:49"}