Open URecke opened 5 years ago
OK, I understand the real issue now ;-) This would have to be fixed in the POCO C++ Libraries first. However, I remember having done that once before and it lead to some issues with other parts of Poco. IMO the best way would be to map Poco::Int64
to std::int64_t
(etc.) on every platform. With the next version of Poco we're moving to C++11/14, so <cstdint>
should be universally available.
Yes, that would be a good solution. Just to clarify even more: We observed side effects especially in templated code. e.g. Poco::Any results in different typed objects instantiated with std::int64_t and with Poco::Int64.
BTW to have the std types we use something similar like the following (missing clean namespace handling...)
`#pragma once
#include <cstdint>
// e.g. EC7 and others can use boost
// Coding guidelines prevents the use of "using"
// keyword in headers. However this is needed
// to solve for compiler and platform differences
using boost::int8_t;
using boost::int16_t;
using boost::int32_t;
using boost::int64_t;
using boost::uint8_t;
using boost::uint16_t;
using boost::uint32_t;
using boost::uint64_t;
#include <stdint.h>
This could help to have a solution even before c++ 11
Should we move this issue to Poco project? Any news?
Yes, this should be moved to Poco project. With the next release we're going to require C++11/C++14, so
https://github.com/macchina-io/macchina.io/blob/0e2b625c61a75e1400c2984a15843dc8cca93b3b/platform/Foundation/include/Poco/Types.h#L64
64 bit is now the default on Mac. However Apple uses long long instead of long. To be compatible the following is suggested:
(used and tried to pass is_same and similar with std types like std::uint64_t on Mac)