mercredi 22 juillet 2015

C++ Why can't the string size funtion be called within constexpr function

   constexpr bool isShorter(const string &s1, const string &s2)
   {
        return s1.size() < s2.size();
   }

When compiled it says: "error call to non-constexpr function"

Aucun commentaire:

Enregistrer un commentaire