fix: fix comment for new added files.
- translate zh-CN comment into en-US. - change some comment into Doxygen style. - add lost Doxygen comment. - enrich the testbench for ceil_div. - add lost metaprogramming functions for some files in macro namespace.
This commit is contained in:
@ -4,3 +4,25 @@
|
||||
#if (defined(YYCC_PTRSIZE_32) + defined(YYCC_PTRSIZE_64)) != 1
|
||||
#error "Current environment used pointer size is not supported!"
|
||||
#endif
|
||||
|
||||
namespace yycc::macro::ptr_size {
|
||||
|
||||
/// @brief The pointer size kind.
|
||||
enum class PtrSizeKind {
|
||||
Bits32, ///< 32-bit environment
|
||||
Bits64 ///< 64-bit environment
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Fetch the pointer size
|
||||
* @return The kind of pointer size.
|
||||
*/
|
||||
inline constexpr PtrSizeKind get_ptr_size() {
|
||||
#if defined(YYCC_PTRSIZE_32)
|
||||
return PtrSizeKind::Bits32;
|
||||
#else
|
||||
return PtrSizeKind::Bits64;
|
||||
#endif
|
||||
}
|
||||
|
||||
} // namespace yycc::macro::ptr_size
|
||||
|
@ -12,3 +12,28 @@
|
||||
#else
|
||||
#error "Current STL is not supported!"
|
||||
#endif
|
||||
|
||||
namespace yycc::macro::stl {
|
||||
|
||||
/// @brief The STL implementation kind.
|
||||
enum class StlKind {
|
||||
MSSTL, ///< Microsoft STL
|
||||
GNUSTL, ///< GNU STL
|
||||
CLANGSTL ///< Clang STL
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Fetch the STL implementation
|
||||
* @return The kind of STL implementation.
|
||||
*/
|
||||
inline constexpr StlKind get_stl() {
|
||||
#if defined(YYCC_STL_MSSTL)
|
||||
return StlKind::MSSTL;
|
||||
#elif defined(YYCC_STL_GNUSTL)
|
||||
return StlKind::GNUSTL;
|
||||
#else
|
||||
return StlKind::CLANGSTL;
|
||||
#endif
|
||||
}
|
||||
|
||||
} // namespace yycc::macro::stl
|
||||
|
Reference in New Issue
Block a user