<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>kubo39</author_name>
  <author_url>https://blog.hatena.ne.jp/kubo39/</author_url>
  <blog_title>kubo39's blog</blog_title>
  <blog_url>https://kubo39.hatenablog.com/</blog_url>
  <categories>
    <anon>D言語</anon>
  </categories>
  <description>D言語で型変換したかったら基本は std.conv.to 使うのが安全である。 import std.conv; void main() { int a = 1; long b = a.to!long; assert(b == 1); } std.conv.toは安全であるが、安全であるということは制約が強いということでもある。例えば以下のコードはOverflowを検知し例外を投げる。 import std.conv : to; void main() { auto a = -11; // int ulong b = a.to!ulong; } $ rdmd -fPIC to.d std.co…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fkubo39.hatenablog.com%2Fentry%2F2016%2F12%2F20%2FD%25E8%25A8%2580%25E8%25AA%259E%25E3%2581%25AEcast&quot; title=&quot;D言語のcast - kubo39&amp;#39;s blog&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2016-12-20 22:57:30</published>
  <title>D言語のcast</title>
  <type>rich</type>
  <url>https://kubo39.hatenablog.com/entry/2016/12/20/D%E8%A8%80%E8%AA%9E%E3%81%AEcast</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
