bepaald / signalbackup-tools

Tool to work with Signal Backup files.
GNU General Public License v3.0
755 stars 36 forks source link

Build error: missing algorithm header #213

Closed Tulux closed 3 months ago

Tulux commented 3 months ago

Hello,

I get a build error when running g++ -std=c++20 */*.cc *.cc -lcrypto -lsqlite3 under Debian 12 (gcc 12):

logger/supportsansi.cc: In lambda function:
logger/supportsansi.cc:41:17: error: ‘any_of’ is not a member of ‘std’
   41 |     return std::any_of(std::begin(Terms), std::end(Terms),
      |                 ^~~~~~

std::any_of requires algorithm header, simply add it to logger.h to fix the error.

Florent

bepaald commented 3 months ago

Thanks! Should be fixed.

Something is obviously pulling in <algorithm> indirectly on my system somehow (and on the various Ubuntu and MacOS systems in GitHub actions, which test the build), that's always always a little curious. But you're absolutely correct of course, it should be explicitly included.

Thanks again!