skeskinen / bert.cpp

ggml implementation of BERT
MIT License
463 stars 58 forks source link

fix: compile error without header #6

Closed lindeer closed 1 year ago

lindeer commented 1 year ago

A trivial compile erro on my arm64 machine with gcc 12.2.1 master@cd1e6ddf7:

[  8%] Building C object ggml/src/CMakeFiles/ggml.dir/ggml.c.o
[ 16%] Linking C static library libggml.a
[ 16%] Built target ggml
[ 25%] Building CXX object CMakeFiles/bert.dir/bert.cpp.o
/home/wesley/WorkPlace/chatGPT/bert.cpp/bert.cpp: In function ‘std::string stripAccents(const std::string&)’:
/home/wesley/WorkPlace/chatGPT/bert.cpp/bert.cpp:215:10: error: ‘unordered_map’ is not a member of ‘std’
  215 |     std::unordered_map<std::string, char> accentMap = {{"À", 'A'},{"Á", 'A'},
      |          ^~~~~~~~~~~~~
/home/wesley/WorkPlace/chatGPT/bert.cpp/bert.cpp:17:1: note: ‘std::unordered_map’ is defined in header ‘<unordered_map>’; did you forget to ‘#include <unordered_map>’?
   16 | #include <algorithm>
  +++ |+#include <unordered_map>
skeskinen commented 1 year ago

Hi, thanks. I think I'm going to remove the unordered map soon.