- Fixed a bunch of compilation errors and warnings

- Added frameworks for retrieving specific filesystem information for a target platform
This commit is contained in:
2025-07-10 01:10:13 -04:00
parent cc20af7504
commit 4c0d36c933
22 changed files with 510 additions and 85 deletions

View File

@@ -65,7 +65,7 @@
using assert_handler = void (*)(const char *, const char *, int , const char *);
extern void __assert_impl(const char* expression, const char* file, int line, const char* function, const char* desc);
void __assert_impl(const char* expression, const char* file, int line, const char* function, const char* desc);
// flagged unlikely to optimize branch prediction
#define assert(expression, description) \

View File

@@ -28,6 +28,7 @@
#pragma push_macro("__cplusplus")
#undef __cplusplus
#include <stddef.h>
#include <stdint.h>
#pragma pop_macro("__cplusplus")

View File

@@ -28,7 +28,7 @@ namespace fennec
namespace detail
{
template<typename> struct __make_unsigned : undefined_t {};
template<typename> struct __make_unsigned : type_transform<undefined_t> {};
template<> struct __make_unsigned<char_t> : type_transform<uchar_t> {};
template<> struct __make_unsigned<uchar_t> : type_transform<uchar_t> {};
@@ -43,7 +43,7 @@ template<> struct __make_unsigned<llong_t> : type_transform<ullong_t> {};
template<> struct __make_unsigned<ullong_t> : type_transform<ullong_t> {};
template<typename> struct __make_signed : undefined_t {};
template<typename> struct __make_signed : type_transform<undefined_t> {};
template<> struct __make_signed<char_t> : type_transform<schar_t> {};
template<> struct __make_signed<uchar_t> : type_transform<schar_t> {};

View File

@@ -191,6 +191,14 @@
# define FENNEC_HAS_BUILTIN_IS_FINAL 0
#endif
// Inconsistent with dynamic intrinsics, requires a massive table for static intrinsics
#if __has_builtin(__is_fundamental)
# define FENNEC_HAS_BUILTIN_IS_FUNDAMENTAL 1
# define FENNEC_BUILTIN_IS_FUNDAMENTAL(arg) __is_fundamental(arg)
#else
# define FENNEC_HAS_BUILTIN_IS_FUNDAMENTAL 0
#endif
// Inconsistent without intrinsics
#if __has_builtin(__is_polymorphic)
# define FENNEC_HAS_BUILTIN_IS_POLYMORPHIC 1

View File

@@ -288,6 +288,21 @@ template<typename T> struct is_arithmetic
/// \tparam T type to check
template<typename T> constexpr bool_t is_arithmetic_v = is_arithmetic<T>::value;
// fennec::is_fundamental ==============================================================================================
///
/// \brief check if \p T is a fundamental type, i.e. arithmetic, void, or nullptr_t
/// \tparam T type to check
template<typename T> struct is_fundamental
: bool_constant<is_arithmetic_v<T> || is_void_v<T> || is_null_pointer_v<T>>{};
///
/// \brief shorthand for ```is_fundamental<T>::value```
/// \tparam T type to check
template<typename T> constexpr bool_t is_fundamental_v = is_fundamental<T>::value;
// fennec::is_same =====================================================================================================
///
@@ -306,7 +321,7 @@ template<typename T> struct is_same<T, T> : true_type {};
/// \tparam T type to check
template<typename T0, typename T1> constexpr bool_t is_same_v = is_same<T0, T1> {};
// fennec::can_convert =================================================================================================
// fennec::is_convertible ==============================================================================================
///
/// \brief check if type `T0` can be converted `T1`

View File

@@ -203,6 +203,8 @@
#include <fennec/lang/detail/__int.h>
#include <fennec/lang/conditional_types.h>
namespace fennec
{
// Basic Types =========================================================================================================
@@ -253,12 +255,7 @@ namespace fennec
template<typename...> using void_t = void; ///< \brief Void type used for SFINAE
/// @}
}
#include <fennec/lang/conditional_types.h>
namespace fennec
{
// Sized Arithmetic Types ==============================================================================================