#include "Lsstream.h"
#include "lyxfunc.h"
#include "support/LAssert.h"
+#include "support/lyxalgo.h" // lyx::count
#ifndef CXX_GLOBAL_CSTD
using std::strlen;
int FormMathsMatrix::AlignFilter(char const * cur, int c)
{
size_t len = strlen(cur);
- // Use the HP version of std::count because the other one is broken on
- // some systems
- int counted;
- std::count(cur, cur+len, '|', counted);
int const n = int(fl_get_slider_value(dialog_->slider_columns) + 0.5) -
- int(len) + counted;
+ int(len) +
+ int(lyx::count(cur, cur + len, '|'));
if (n < 0)
return FL_INVALID;