並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 10 件 / 10件

新着順 人気順

c++の検索結果1 - 10 件 / 10件

  • C++erは全員戻り値型の後置記法を使おう - ペイントソフト開発日誌

    目次 目次 「戻り値型の後置記法」って何? 何が嬉しいの? 問題点 「戻り値型の後置記法」って何? C++11から導入された言語仕様です。 タイトルの呼び方は自分が勝手に使っているだけで、英語圏だと「trailing-return-type」がよく使われるらしい。 cpprefjp.github.io この仕様を使うと例えば以下のようなコードが int Add(int a, int b) { return a + b; } このようになります。 auto Add(int a, int b) -> int { return a + b; } 何が嬉しいの? この仕様はC++のメタプログラミングで戻り値型の推論を簡単に行う目的で使用されます。 なんだ、そんなC++上級者のための機能なんて下々の人間には関係ないじゃん、とお思いかもしれませんが、この機能にはもう一つわかりやすい大きなメリットがある

      C++erは全員戻り値型の後置記法を使おう - ペイントソフト開発日誌
    • MSX-C に関する情報 - Qiita

      はじめに 『MSX-C』関連の情報を集めてみました。 MSX-C 『MSX-C』は ASCII が発売した MSX 用の C コンパイラです。元々は エル・エス・アイ・ジャパン株式会社 の『LSI C-80』の OEM だったようです。 『MSX-C』はアセンブラソースを吐くタイプのコンパイラですので、実行形式ファイルを生成するにはアセンブラとリンカが必要です。 See also: ASCII MSX-C (MSX Resource Center) LSI C-86 (Wikipedia) 準拠している C 言語の規格 ANSI C (1989) よりも前に発売された製品なので、後に制定された規格には準拠しておらず、K&R のサブセット的な実装となっています。例えば、MSX-C で利用可能なデータ型は次の 4 (3) 種類のみです。 型 長さ 範囲

        MSX-C に関する情報 - Qiita
      • if constexpr文はテンプレート世界のラムダ式である

        GraphQLサーバの構成要素を整理する #ハッカー鮨 #tsukijigraphql / graphql server technology selection

          if constexpr文はテンプレート世界のラムダ式である
        • The life and times of an Abstract Syntax Tree

          By Francesco Bertolaccini You’ve reached computer programming nirvana. Your journey has led you down many paths, including believing that God wrote the universe in LISP, but now the truth is clear in your mind: every problem can be solved by writing one more compiler. It’s true. Even our soon-to-be artificially intelligent overlords are nothing but compilers, just as the legends foretold. That sma

            The life and times of an Abstract Syntax Tree
          • Exploring the c4... compiler?

            This week I found myself digging through the code of c4, an implementation of C “in four functions”, by Robert Swierczek. I remember coming across c4 when it was released ten years ago. It got me excited: hey, C in four functions, that means it’s easy to understand right? That excitement turned into “oh, I see” as soon as I scrolled through the code. c4 is dense, barely commented, and, frankly, st

              Exploring the c4... compiler?
            • Freedom and Portability

              The economic advantages of portability are very great. In many segments of the computer industry, the dominant cost is development and maintenance of software. Dennis Ritchie and Stephen Johnson 1978 … many insist that C is the programming language and that it will last forever. Byte Magazine 1983 The August 1983 issue of Byte Magazine devoted its cover, and a large part of its editorial content,

                Freedom and Portability
              • Software optimization resources. C++ and assembly. Windows, Linux, BSD, Mac OS X

                See also my blog Contents Optimization manuals Vector class library Object file converter and disassembler Subroutine library ForwardCom: An open standard instruction set for high performance microprocessors Test programs for measuring clock cycles in C++ and assembly code Floating point exception tracking through NAN propagation CPUID manipulation program Links Optimization manuals This series of

                • Compiling higher order functions with GADTs

                  Implementing first class functions in a bytecode interpreter is trivial. But how do compilers that generate machine code (or lower to C, or SSA) implement higher order functions? Back in 2021, I found an answer when contributing closures to the Pallene compiler. Today I was researching something loosely related, and found yet another neat trick called defunctionalization in this paper. Defunctiona

                  • https://waxc.netlify.app/

                    • Parsing and all that

                      Hello again! I’m picking up my series on Automata, with this post that goes into what I had always meant to get to: parsers. We’ll check out the old-school linear time parsing algorithms, which only need to go over the input once, without backtracking or caching. We’ll check out LL and LR, parse tables, recursive descent and recursive ascent. Welcome to the world of deterministic parsing… Refreshe

                      1