I installed Firebase with Auth, Firestore, Functions, per pod and I was filled with alerts that I was solving little by little, after that configure and test firebase functions and works fine. The only one I can’t solve is the following:
Implicit conversion loses integer precision: ‘typename std::enable_if<!std::is_same<void, decltype(block())>::value, decltype(block())>::type’ (aka ‘unsigned long’) to ‘int’
Here!
int LocalStore::Backfill() const {
return persistence_-> Run("Backfill Indexes", [&] {
return index_backfiller_->WriteIndexEntries(this);
});
}
App and firebase DB seems to work fine but I don’t know what is that and what problem could I have it in the future!
Any help?
2
Answers
Although I do not know the tool you are using, I can read the error message for you and this should help you to answer your question.
So function
int LocalStore::Backfill() const
wants to returninteger
, a signed integer. But is fed withunsigned long
by statement:which returns the type described as
which turns out to be a
(aka 'unsigned long')
, sounsigned long
.So this is now your decision if such implicit casting is OK. I just want to say that this is a messy way of coding to confuse signed and unsigned and integer and long, even if it works.
IMO you should change
Backfill
to returnunsigned long
.return "auto"