add STD_put_time_NOT_SUPPORTED

This commit is contained in:
qPCR4vir
2016-02-27 00:13:37 +01:00
parent f8fb4a464d
commit 7f10f8d28d
3 changed files with 68 additions and 1 deletions

View File

@@ -31,6 +31,7 @@
* - _SCL_SECURE_NO_WARNNGS, _CRT_SECURE_NO_DEPRECATE (VC)
* - STD_CODECVT_NOT_SUPPORTED (VC RC, <codecvt> is a known issue on libstdc++, it works on libc++)
* - STD_THREAD_NOT_SUPPORTED (GCC < 4.8.1)
* - STD_put_time_NOT_SUPPORTED (GCC < 5)
* - STD_NUMERIC_CONVERSIONS_NOT_SUPPORTED (MinGW with GCC < 4.8.1)
* - STD_NUMERIC_CONVERSIONS_NOT_SUPPORTED (MinGW with GCC < 4.8.1)
* - STD_TO_STRING_NOT_SUPPORTED (MinGW with GCC < 4.8)
@@ -133,8 +134,13 @@
#endif
#endif
#if ((__GNUC__ > 5) )
# defie STD_put_time_NOT_SUPPORTED
#endif
#if ((__GNUC__ > 5) || ((__GNUC__ == 5) && (__GNUC_MINOR__ >= 3 ) ) )
#undef STD_FILESYSTEM_NOT_SUPPORTED
# undef STD_FILESYSTEM_NOT_SUPPORTED
#endif
#if (__GNUC__ == 4)

View File

@@ -92,6 +92,24 @@ namespace std
}
#endif
#ifdef STD_put_time_NOT_SUPPORTED
namespace std
{
//Workaround for no implemenation of std::put_time in gcc < 5.
/* std unspecified return type */
//template< class CharT, class RTSTR >// let fail for CharT != char / wchar_t
//RTSTR put_time(const std::tm* tmb, const CharT* fmt);
//template< >
std::string put_time/*<char, std::string>*/(const std::tm* tmb, const char* fmt);
//Defined in header <ctime>
// std::size_t strftime(char* str, std::size_t count, const char* format, const std::tm* time);
//template<>
//std::wstring put_time<wchar_t, std::wstring>(const std::tm* tmb, const wchar_t* fmt);
}
#endif // STD_put_time_NOT_SUPPORTED
namespace nana
{
/// Checks whether a specified text is utf8 encoding