dimanche 18 février 2018

std::bind error with "conditional expression of type 'std::_Unforced' is illegal"

Need help on understanding this error

template <typename Func>
            bool IsConfigured(Func &f, const CString& type, const const MESSAGE_TYPE& message) const
            {
                CString strTag, strValue;
                if (f(type, strTag, strValue))  <== error reported here
                {
                    //do something with message and return true/false
                }
                return false;
            };

And calling here

if(IsConfigured(std::bind(&class::function, object, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3), "type1", message))

I could not understand what is "conditional expression of type 'std::_Unforced' is illegal" as class::function returned bool.

Aucun commentaire:

Enregistrer un commentaire