COMP: disambiguate pTraits for long/unsigned long on Darwin
This commit is contained in:
parent
707db0b65b
commit
bdb890d4e2
@ -1,2 +1,3 @@
|
||||
Test-pTraits.C
|
||||
Test-pTraits.cxx
|
||||
|
||||
EXE = $(FOAM_USER_APPBIN)/Test-pTraits
|
||||
|
@ -126,7 +126,7 @@ Ostream& operator<<(Ostream& os, const int64_t val);
|
||||
// On Darwin:
|
||||
// long is not unambiguously (int32_t | int64_t)
|
||||
// - explicitly resolve for input and output
|
||||
#if defined(__APPLE__)
|
||||
#ifdef __APPLE__
|
||||
Istream& operator>>(Istream& is, long& val);
|
||||
Ostream& operator<<(Ostream& os, const long val);
|
||||
#endif
|
||||
@ -196,6 +196,11 @@ public:
|
||||
};
|
||||
|
||||
|
||||
#ifdef __APPLE__
|
||||
//- On Darwin: long is not unambiguously (int64_t)
|
||||
template<> class pTraits<long> : pTraits<int64_t> {};
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
@ -182,7 +182,7 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const int64_t val)
|
||||
}
|
||||
|
||||
|
||||
#if defined(__APPLE__)
|
||||
#ifdef __APPLE__
|
||||
Foam::Istream& Foam::operator>>(Istream& is, long& val)
|
||||
{
|
||||
return operator>>(is, reinterpret_cast<int64_t&>(val));
|
||||
|
@ -186,6 +186,11 @@ public:
|
||||
};
|
||||
|
||||
|
||||
#ifdef __APPLE__
|
||||
//- On Darwin: unsigned long is not unambiguously (uint64_t)
|
||||
template<> class pTraits<unsigned long> : pTraits<uint64_t> {};
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
Loading…
Reference in New Issue
Block a user