From b2b2d021678fe925b3cc31aa57590111da662bac Mon Sep 17 00:00:00 2001 From: Egor Pugin Date: Sat, 26 Dec 2020 15:09:03 +0300 Subject: [PATCH] Another msvc/macos fix attempt. --- include/tesseract/genericvector.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/include/tesseract/genericvector.h b/include/tesseract/genericvector.h index 05f3133e..476aea73 100644 --- a/include/tesseract/genericvector.h +++ b/include/tesseract/genericvector.h @@ -310,11 +310,13 @@ class GenericVector : public std::vector { std::function compare_cb_; }; -#if defined(_MSC_VER) -// msvc stl does not have ::data() in vector, -// so we add custom specialization +#if defined(_MSC_VER) || defined(__APPLE__) +// MSVC stl does not have ::data() in vector, +// so we add custom specialization. +// On Apple there are also errors when using std::vector, +// so we replace it with vector as a workaround. template <> -class GenericVector : public std::vector {}; +class GenericVector : public std::vector {}; #endif // The default FileReader loads the whole file into the vector of char,