mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-12-12 15:39:04 +08:00
Another msvc/macos fix attempt.
This commit is contained in:
parent
f7c78f97a1
commit
b2b2d02167
@ -310,11 +310,13 @@ class GenericVector : public std::vector<T> {
|
|||||||
std::function<bool(const T&, const T&)> compare_cb_;
|
std::function<bool(const T&, const T&)> compare_cb_;
|
||||||
};
|
};
|
||||||
|
|
||||||
#if defined(_MSC_VER)
|
#if defined(_MSC_VER) || defined(__APPLE__)
|
||||||
// msvc stl does not have ::data() in vector<bool>,
|
// MSVC stl does not have ::data() in vector<bool>,
|
||||||
// so we add custom specialization
|
// so we add custom specialization.
|
||||||
|
// On Apple there are also errors when using std::vector<bool>,
|
||||||
|
// so we replace it with vector<int> as a workaround.
|
||||||
template <>
|
template <>
|
||||||
class GenericVector<bool> : public std::vector<bool> {};
|
class GenericVector<bool> : public std::vector<int> {};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// The default FileReader loads the whole file into the vector of char,
|
// The default FileReader loads the whole file into the vector of char,
|
||||||
|
Loading…
Reference in New Issue
Block a user