manually integrate stlite

This commit is contained in:
2024-04-15 03:58:17 +00:00
parent 05735a7ae3
commit 7b30edc8c8
6 changed files with 1970 additions and 0 deletions

39
stlite/exceptions.hpp Normal file
View File

@ -0,0 +1,39 @@
#ifndef SJTU_EXCEPTIONS_HPP
#define SJTU_EXCEPTIONS_HPP
#include <cstddef>
#include <cstring>
#include <string>
namespace sjtu {
class exception {
protected:
const std::string variant = "";
std::string detail = "";
public:
exception() {}
exception(const exception &ec) : variant(ec.variant), detail(ec.detail) {}
virtual std::string what() {
return variant + " " + detail;
}
};
class index_out_of_bound : public exception {
/* __________________________ */
};
class runtime_error : public exception {
/* __________________________ */
};
class invalid_iterator : public exception {
/* __________________________ */
};
class container_is_empty : public exception {
/* __________________________ */
};
}
#endif