タグ

ブックマーク / ezoeryou.github.io (2)

  • 巻末: C++14の新機能

    巻末: C++14の新機能 C++14は、2014年に制定されたC++11の次のC++標準規格である。C++14の位置づけとしてはマイナーアップデートで、新機能の追加は少ない。 二進数リテラル(binary literal) 二進数リテラルは、整数リテラルである。 int a = 0b1011 ; // 11 inb b = 0b10000000 ; // 128 プレフィクス0b、もしくは0Bに続いて'1'か'0'が続く整数リテラルは、二進数リテラルである。 二進数リテラルは、浮動小数点数リテラルではない。 double d = 0b111.11 ; // エラー 整数リテラルのサフィックスは、二進数リテラルにも適用できる。 auto a = 0b0u ; // unsigned int auto b = 0b0l ; // long プログラミングで整数を扱うときに、二進数で考えたい場

  • C++11: Syntax and Feature

    C++11の文法と機能(C++11: Syntax and Feature) Copyright (C) 2013 江添亮. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GN

  • 1