Who's Online |
85 user(s) are online ( 74 user(s) are browsing Forums)
Members: 0
Guests: 85
more...
|
|
Headlines |
-
uaegfxforos4.lha - driver/video
Apr 10, 2021
-
drawing_dt.lha - datatype/image
Apr 9, 2021
-
jansson_library.lha - development/library/misc
Apr 8, 2021
-
wormwars.lha - game/action
Apr 8, 2021
-
zapperng.lha - utility/workbench
Apr 8, 2021
-
basque.lha - game/misc
Apr 7, 2021
-
videothumbnailer.lha - graphics/icon
Apr 5, 2021
-
egalaxtouchusbfd.lha - driver/input
Apr 4, 2021
-
itmtouchusbfd.lha - driver/input
Apr 4, 2021
-
touchdevice.lha - driver/input
Apr 4, 2021
|
|
|
Re: Porting to AmigaOS4 thread | Subject: Re: Porting to AmigaOS4 thread by kas1e on 2019/8/10 13:48:38
@Salas00 (and others too of course)
Meet today with another problem:
//! Writes a ustring16 to an ostream.
template <typename TAlloc>
inline std::ostream& operator<<(std::ostream& out, const ustring16<TAlloc>& in)
{
out << in.toUTF8_s().c_str();
return out;
}
//! Writes a ustring16 to a wostream.
template <typename TAlloc>
inline std::wostream& operator<<(std::wostream& out, const ustring16<TAlloc>& in)
{
out << in.toWCHAR_s().c_str();
return out;
}
While first part is fine, second one, with "wostream" didn't works , same "wostream not a member of std::". Maybe have any idea how to replace it to make it still works ?
Also there is some strange issue with previous "wstring" defination. There is test case which fail very heavy:
#include <string>
#include <sstream>
#include <unordered_map>
#ifdef __amigaos4__
namespace std {
template <typename T> string to_string(const T &n) {
ostringstream strm;
strm << n;
return strm.str();
}
typedef basic_string<wchar_t> wstring;
}
#endif
main()
{
std::unordered_map<std::wstring, std::wstring> m_translations;
}
Bring lot's of error from bits/hashtable.h.
Replacing <wchar_t> on <char> make it compiles, but not sure if that fits.
Also, it works when i trying to compile it as it (with wchar_t) , but over clib2. Its with newlib such issue.
|
|