Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

DirectXMath as a C++ module

オープン
#349 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
活発
技術スタック
cpp

調査の方向性

Start by reading DirectXMath.h and the proposed DirectXMath.ixx contents, then inspect DirectXPackedVector.h and the mentioned SHMath, Stereo3D, and XDSP components. Done means the module structure, standard-library imports, export granularity, and Windows SDK or cppwinrt integration questions are resolved and an agreed module design is documented.

索引モデルが issue の本文から書いたものです。

説明

A few months ago, I designed the winrt module for C++/WinRT. C++/WinRT depends on DirectXMath, so I hope DirectXMath can also be modularized. This would help make the winrt module cleaner and compilation faster. Thanks to the high quality of DirectXMath, modularizing it is easy, but some decisions need to be discussed.

Overall, the following changes need to be made:

  1. Provide a macro to disable the inclusion of all standard library headers in DirectXMath.h (for example, XM_IMPL_MODULE).
  2. Create the following DirectXMath.ixx:
    module;
    #include "sal.h"
    #include <intrins.h>
    #include <cassert>
    export module DirectXMath;
    import std;
    #define XM_IMPL_MODULE
    export
    {
    extern "C++"
    {
    #include "DirectXMath.h"
    }
    }
    
    extern "C++" is used so that when the header file and the module are used at the same time, the same functions can be merged and ODR violations can be avoided.

Once the details are settled, I can implement it. Any questions are welcome.

My questions:

  1. I hope to avoid using C standard library headers, and instead use the suffixless headers of the C++ standard library, and complete the std:: qualification for these types. This is to avoid using the std.compact module.
  2. Are fine-grained exports needed?
  3. DirectXPackedVector.h is not in DirectXMath.h. Should it be part of DirectXMath.ixx or a separate module?
  4. How should SHMath, Stereo3D, and XDSP be handled?
  5. Can the Windows SDK package the DirectXMath module?
主要言語
C++
スター
1.8k
フォーク
264
平均マージ
3日 21時間
マージ済み PR(30日)
7

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

microsoft/DirectXMath のほかの issue

microsoft/DirectXMath の issue をすべて見る

似ている issue

C++ の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。