#ifndef __FENNIX_KERNEL_STD_H__ #define __FENNIX_KERNEL_STD_H__ #include #include #include #include /** * @brief // stub namespace for std::align_val_t and new operator * @note // Found on https://gcc.gnu.org/legacy-ml/gcc-patches/2016-09/msg00628.html for "_ZnwmSt11align_val_t" compiler error */ namespace std { typedef __SIZE_TYPE__ size_t; enum class align_val_t : std::size_t { }; template class smart_ptr { public: using SmartPointer::SmartPointer; using SmartPointer::operator*; using SmartPointer::operator->; }; template class auto_ptr { public: using AutoPointer::AutoPointer; }; template class unique_ptr { public: using UniquePointer::UniquePointer; }; template class weak_ptr { public: using WeakPointer::WeakPointer; }; template class shared_ptr { using SharedPointer::SharedPointer; using SharedPointer::operator*; using SharedPointer::operator->; }; template struct remove_reference { typedef T type; }; template struct remove_reference { typedef T type; }; template struct remove_reference { typedef T type; }; template using remove_reference_t = typename remove_reference::type; template T &&forward(remove_reference_t &t) { return static_cast(t); }; template T &&forward(remove_reference_t &&t) { return static_cast(t); }; template shared_ptr make_shared(Args &&...args) { return SharedPointer(new T(forward(args)...)); }; template class vector : public Vector { public: using Vector::Vector; using Vector::operator=; using Vector::operator[]; using typename Vector::iterator; }; class string : public String { public: using String::String; using String::operator=; using String::operator+; using String::operator<<; using String::operator[]; using String::operator==; using String::operator!=; using typename String::iterator; }; } #endif // !__FENNIX_KERNEL_STD_H__