Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
85 user(s) are online (74 user(s) are browsing Forums)

Members: 0
Guests: 85

more...

Support us!

Headlines

Report message:*
 

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::ostreamoperator<<(std::ostreamout, const ustring16<TAlloc>& in)
{
    
out << in.toUTF8_s().c_str();
    return 
out;



//! Writes a ustring16 to a wostream.
template <typename TAlloc>
inline std::wostreamoperator<<(std::wostreamout, 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 Tstring to_string(const &n) { 
        
ostringstream strm
        
strm << n
        return 
strm.str(); 
    } 

    
typedef basic_string<wchar_twstring

#endif

main()
{
    
std::unordered_map<std::wstringstd::wstringm_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.

Powered by XOOPS 2.0 © 2001-2016 The XOOPS Project