並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 18 件 / 18件

新着順 人気順

using namespace std cppの検索結果1 - 18 件 / 18件

  • 競プロのための標準 C++

    ◆ 内容 競技プログラミングで知っておきたい C++ 標準機能を解説します。競技プログラミング独特のハックやスタイル(<bits/stdc++.h>, 大きな配列、using namespace std 等)を避け、一般の C++ ソフトウェア開発でも通用するコードを心がけています。 ◆ ライセンス 記事中のソースコードは CC0 1.0(パブリックドメイン相当)です。自由に利用・改変・再配布できます。 ◆ C++ バージョン C++20 / C++23(AtCoder と同じ gcc 12.2) ◆ 対象読者 ・競技プログラミングの上達のために C++ の機能を深く学びたい方 ・コンテスト中に参照できる C++ ドキュメントを探している方 APG4b や市販の入門書で C++ を学んだ人にとって有益な内容から書き進めています。将来はより幅広い内容を扱います。 ◆ 本書へのご意見・ご提案

      競プロのための標準 C++
    • neue cc - csbindgen - C#のためのネイティブコード呼び出し自動生成、或いはC#からのネイティブコード呼び出しの現代的手法について

      ネイティブコードとC#を透過的に接続するために、RustのFFIからC#のDllImportコードを自動生成するライブラリを作成し、公開しました。Cysharp初のRustライブラリです!先週にプレビューを出していましたが、しっかりした機能強化とReadMeの充実をして正式公開、です! Cysharp/csbindgen crates.io/crates/csbindgen めちゃくちゃスムーズにネイティブコードがC#から呼べるようになります。すごい簡単に。超便利。こりゃもうばんばんネイティブコード書きたくなりますね……!ただし書くコードはRustのみ対応です。いや、別にRustでいいでしょ、Rustはいいぞ……! しかしまず前提として言っておくと、ネイティブコードは別に偉くもなければ、必ず速いというわけでもないので、極力書くのはやめましょう。C#で書くべき、です。高速なコードが欲しければ

      • Zngur - Zngur

        Zngur Zngur (/zængɑr/) is a C++/Rust interop tool. It tries to expose arbitrary Rust types, methods, and functions while preserving their semantics and ergonomics as much as possible. Using Zngur, you can use arbitrary Rust crates in your C++ code as easily as using them in normal Rust code, and you can write idiomatic Rusty APIs for your C++ library inside C++. Idea Rust and C++ are similar langu

        • ソースコードを静的解析するオープンソースのSourcetrailで効率よく解析 | tracpath:Works

          はじめに sourcetrailはソースの内部依存関係をグラフ等で可視化できる、オープンソースソフトウェアです。ビジュアルグラフなどを使った分かりやすい表示ができるのが特徴で、もともと商用ソフトウェアとして販売されていましたが、2019年にオープンソース化されました。今回は、sourcetrailの導入や運用方法についてのアドバイス等を説明したいと思います。 レッスン1.sourcetrailでできること まずは、sourcetrailとは何なのか、何ができるのかを学びましょう。 対応言語:C/C++、Java、Python 対応OS:Windows、Mac、Linux sourcetrail公式サイトhttps://www.sourcetrail.com/ sourcetrailでできる主な機能は以下です。 依存関係グラフ、ツリーの出力 グラフに相当するコードの表示 コードから関係するグ

            ソースコードを静的解析するオープンソースのSourcetrailで効率よく解析 | tracpath:Works
          • MH-Z19BとRaspberry Pi Zeroで二酸化炭素濃度を測定する

            B! 6 0 0 0 MH-Z19Bという二酸化炭素センサーを買って、 Raspberry Pi Zeroにつなげて家の中の二酸化炭素を測定するようにしてみました。 MH-Z19C MH-Z19B Raspberry Piとの接続 Raspberry PiのUART設定 二酸化炭素濃度の読みとり Python C++ Go キャリブレーション 外気の二酸化炭素濃度 実際の配線 実測値 測定が止まる 気温 まとめ MH-Z19C 追記: 2021/09/18 以下で紹介しているAliExpressで買ったMH-Z19Bの調子が悪かったので 秋月電子通商でMH-Z19Cを買って取り替えました。 MH-Z19CとRaspberry Pi Zeroで二酸化炭素濃度を測定する 追記ここまで MH-Z19B MH-Z19B ピン付き(二酸化炭素(CO2)センサーモジュール、0-5000ppm、赤外線方

              MH-Z19BとRaspberry Pi Zeroで二酸化炭素濃度を測定する
            • 正規表現で経路依存のブレークポイントを作る - ashiato45の日記

              これは何? プログラムのデバッグをしていて、あるいは既存のプログラムの挙動を調べていて、ブレークポイントがある経路を通ってきたときのみ停止してほしいということが結構ある気がしたので、そういうブレークポイントが作れないかをやってみました。その経路の指定のために、各所に「ラベルつきのブレークポイント」が置けるようにして、そのラベルたちの吐いたログが、予め設定しておいた正規表現にマッチするときのみ停止するという風にしてみたらいい感じだったので書いてみます。 Motivating Examples ケース1: ループのなかの処理の最初のほうは無視して最後のほうだけブレークポイントを止めたい 例えばゲームのメインループや最適化法の反復処理で、ループの最後のほうに値や挙動がどうなっているか調べたいのに普通にブレークポイントを置くとそこに到達するまでcontinueし続けなければいけないということがあり

                正規表現で経路依存のブレークポイントを作る - ashiato45の日記
              • Python と C++ の連携: 高い生産性と優れたパフォーマンスのハーモニー - ITエンジニアが仕事に対して思うこと

                # 近年、プログラムの開発において異なるプログラミング言語を組み合わせることが一般的になり、その中でもPythonとC++の連携は、高い生産性と優れたパフォーマンスを同時に享受できる魅力的なアプローチです。本記事では、PythonとC++を連携させる際の手法や実際のコーディング例を通じて、そのメリットや技術的なポイントについて詳細に解説します。 Python と C++ の連携の背景 Pythonはその簡潔な文法と豊富なライブラリにより、開発者に高い生産性をもたらしています。一方で、C++はそのパワフルで効率的な処理と豊富な機能セットにより、高いパフォーマンスが求められる領域で広く利用されています。PythonとC++の連携を実現することで、開発者は高水準の言語と低水準の言語を柔軟に組み合わせ、プロジェクトの要件に最適なツールを選択できます。 Python から C++ へのデータの受け渡

                  Python と C++ の連携: 高い生産性と優れたパフォーマンスのハーモニー - ITエンジニアが仕事に対して思うこと
                • [C++]契約プログラミング機能のこれまでとこれから - 地面を見下ろす少年の足蹴にされる私

                  この記事はC++アドベントカレンダー2023 25日目の記事です。ご参加の皆様お疲れ様でした! C++ Contracts C++20 Contracts 問題点とMVP(Minimum Viable Product) 最初のMVP仕様 関数の再宣言と契約注釈 引数の事後条件からの参照 契約条件式の副作用 C++26に向けたロードマップ 契約注釈のセマンティクス 違反ハンドラ 構文 C++26に向けて、残りの問題 2023年末時点でのMVP 参考文献 C++ Contracts ContractとはContract programmingの略称で、C++ ContractsとはC++における契約プログラミング機能を指す言葉です(sは付いたり付かなかったりします)。 C++ Contractsとは、契約プログラミングという考え方に基づいた設計(契約による設計)をより自然に行えるようにするため

                    [C++]契約プログラミング機能のこれまでとこれから - 地面を見下ろす少年の足蹴にされる私
                  • C++20's Extensions to Chrono Available in Visual Studio 2019 version 16.10 - C++ Team Blog

                    While the <chrono> header has been available as part of the STL since C++11, among the changes included in C++20 there were several extensions to chrono including support for calendrical types, time zones, leap seconds, and integration with format. A great deal of innovation and work was required in order to complete these additional features; shipping these new C++20 additions so soon would not h

                      C++20's Extensions to Chrono Available in Visual Studio 2019 version 16.10 - C++ Team Blog
                    • A string formatting library in 65 lines of C++

                      In this write-up, I will walk you through an implementation of a string formatting library for C++ I came up with for my video game. The end result came out really compact, at only 65 lines of code—providing a skeleton that can be supplemented with additional functionality at low cost. Usage Given a format buffer… char buffer[64]; String_Buffer buf = {str, sizeof str}; …the fmt::format function pr

                      • I'm Building a Browser for Reverse Engineers

                        Preamble In the expanding world of AI my heart still lies in AST transforms, browser fingerprinting, and anti-bot circumvention. In fact, that's the majority of this blog's content. But my workflow always felt... primitive. I was still manually sifting through page scripts, pasting suspicious snippets into an editor, and writing bespoke deobfuscators by hand. Tools like Webcrack and deobfuscate.io

                        • cuneicode, and the Future of Text in C

                          Following up from the last post, there is a lot more we need to cover. This was intended to be the post where we talk exclusively about benchmarks and numbers. But, I have unfortunately been perfectly taunted and status-locked, like a monster whose “aggro” was pulled by a tank. The reason, of course, is due to a few folks taking issue with my outright dismissal of the C and C++ APIs (and not showi

                            cuneicode, and the Future of Text in C
                          • サンプルコードによるC++23ジェネレータの紹介 | ドクセル

                            [beta] <generator> // [generator.syn] Header <generator> synopsis namespace std { template< class Ref, class V = void, class Allocator = void> class generator; ? } namespace pmr { ... } ※ pmr名前空間ではPolymorphic Memory Resource関連のエイリアスが定義される 5 [beta] std::generator // [coro.generator.class] Class template generator template<class Ref, class V = void, class Allocator = void> class std::generator : pub

                              サンプルコードによるC++23ジェネレータの紹介 | ドクセル
                            • 地面を見下ろす少年の足蹴にされる私

                              文書の一覧 JTC1/SC22/WG21 - Papers mailing2025-12 全部で113本あります。 もくじ N5011 Brno 2026 N5029 WG21 2025-10 Kona Admin telecon minutes N5031 WG21 2025-11 Kona Minutes of Meeting N5032 Working Draft, Standard for Programming Language C++ N5033 Editors' Report - Programming Languages - C++ P1317R2 Remove return type deduction in std::apply P1789R2 Library Support for Expansion Statements P1789R3 Library Suppor

                                地面を見下ろす少年の足蹴にされる私
                              • Autowareの開発を更に加速!Openなシナリオテストフレームワークを紹介! - TIER IV Tech Blog

                                はじめに こんにちは!ティアフォーの片岡と申します。 本日は、ティアフォーのSimulation Teamで開発してきたシナリオテストフレームワークであるscenario_simulatorをApache-2.0ライセンスでOSS(オープンソースソフトウェア)とした件についてお話します。 github.com また、ティアフォーでは「自動運転の民主化」をともに実現すべく、ロボット技術、ゲームエンジンを使った開発等幅広い分野に知見を持ったSimulation Engineerを募集しております。 自動運転のSimulator開発は、バグの少ない高品質なコードを書くのはもちろんのこと、三次元幾何や統計、はてはプログラミング言語開発まで様々な知識が要求される分野であり、広く深く様々なことをやってみたい方には非常にマッチするポジションであると思います。 もし興味等ございましたら以下のページよりコン

                                  Autowareの開発を更に加速!Openなシナリオテストフレームワークを紹介! - TIER IV Tech Blog
                                • std::flip

                                  std::flip is a little-known utility from the C++ standard library header <functional>: it is a higher-order function that accepts a Callable and returns an equivalent Callable with the order of its parameters reversed (or “flipped”). To understand how it can be useful, let’s start with a simple example. Consider the following tree node class: struct node { int value; node* parent = nullptr; node*

                                  • torchcomms: a modern PyTorch communications API – PyTorch

                                    Introduction Torchcomms is a new experimental, lightweight communication API intended for use with PyTorch Distributed (PTD). In addition to the core API, we are open-sourcing NCCLX, a new backend we developed to scale to over 100,000 GPUs. With our first release of torchcomms, we’re delivering the foundational APIs and backends required for large-scale model training in PyTorch. This initial rele

                                    • C++ exceptions under the hood

                                      Index A tiny ABI An ABI to appease the linker Catching what you throw Magic around __cxa_begin_catch and __cxa_end_catch Gcc_except_table and the personality function A nice personality Two-phase handling Catching our first exception _Unwind_ and call frame info Reading a CFI table And suddenly, reflexion in C++ Setting the context for a landing pad Multiple landing pads & the teachings of the gur

                                        C++ exceptions under the hood
                                      1