1
0

doc: add doc for moved files

This commit is contained in:
2025-10-07 18:49:02 +08:00
parent c48e79753d
commit ab8489c377
4 changed files with 50 additions and 15 deletions

View File

@@ -3,6 +3,18 @@
#include <cstddef>
#include <string_view>
/**
* @brief The namespace providing primitive types.
* @details
* When I writing with Rust, I notice that most pf primitive types has explicit and exact size, and their names are short and clear.
* Hoeever, in C++, most primitive types are variable based on system, due to the legacy of C era.
* All primitive types with explicit size are only can be fetched in a specific header file,
* and, their names are too long because they can not be registered as reserved keywords or names
* due to the name conflict with so much code written in past years.
* However, STL can't do this but I can do this.
* I invent this namespace providing primitive types, such as integers, floating-point numbers, and strings,
* in Rust style, their names areshort and clear.
*/
namespace yycc::primitive {
// `bool` is keyword so should not declare it anymore.
@@ -23,5 +35,6 @@ namespace yycc::primitive {
using f32 = float;
using f64 = double;
using str = std::u8string_view;
// using String = std::u8string;
// using str = std::u8string_view;
}