Man im so tired This is wrong but I can taste it, im close

This commit is contained in:
NaifBanana
2026-05-18 01:35:28 -05:00
parent 31ea554cd1
commit 0ab3f7e808
8 changed files with 182 additions and 59 deletions
+3 -2
View File
@@ -1,10 +1,11 @@
#include "Errors.hpp"
#include "TypeTraits.hpp"
namespace nb {
const std::string Error<DefaultError>::type = "nb::Error";
const std::string Error<nb::NoneType>::type = "nb::Error";
const ErrorCodeMap Error<DefaultError>::ErrorMessages = {
const ErrorCodeMap Error<nb::NoneType>::ErrorMessages = {
{Error::Codes::GENERAL, "General std::exception."},
{Error::Codes::UNDEFINED, "Undefined / general error."},
{Error::Codes::BADERRORCODE, "Unrecognized error code."}
+5 -11
View File
@@ -1,14 +1,8 @@
#include <corecrt.h>
#include <stdint.h>
#include <string>
#include "Utils.hpp"
#ifdef _NB_TARGET_WINDOWS
const std::string NEWLINE("\r\n");
const std::wstring WNEWLINE(L"\r\n");
#endif // _NB_TARGET_WINDOWS
#ifdef _NB_TARGET_LINUX
const std::string NEWLINE("\n");
const std::wstring WNEWLINE(L"\n");
#endif // _NB_TARGET_LINUX
template<>
std::wstring nb::str_to_wstr(const std::string& in) {
std::wstring ret(in.begin(), in.end());
return ret;
}