Linking error
Yuriy Skalko
yuriy.skalko at gmail.com
Wed Oct 14 19:25:34 UTC 2020
> It's the other way that's needed here:
>
> template<>
> unsigned long long convert<unsigned long long>(string const & s)
>
> {
>
> return strtoull(s);
>
> }
>
>
> I assume that will fix it.
>
>
> Riki
Thanks, it helps.
Yuriy
-------------- next part --------------
diff --git a/src/support/convert.cpp b/src/support/convert.cpp
index af0ad62f2b..768a9aba4b 100644
--- a/src/support/convert.cpp
+++ b/src/support/convert.cpp
@@ -210,6 +210,15 @@ unsigned long convert<unsigned long>(string const s)
}
+#ifdef HAVE_LONG_LONG_INT
+template<>
+unsigned long long convert<unsigned long long>(string const s)
+{
+ return strtoull(s.c_str(), nullptr, 10);
+}
+#endif
+
+
template<>
double convert<double>(string const s)
{
diff --git a/src/support/convert.h b/src/support/convert.h
index 1b3e5bef29..1924a7772e 100644
--- a/src/support/convert.h
+++ b/src/support/convert.h
@@ -49,6 +49,9 @@ template<> int convert<int>(std::string const & s);
template<> int convert<int>(docstring const & s);
template<> unsigned int convert<unsigned int>(std::string const & s);
template<> unsigned long convert<unsigned long>(std::string const & s);
+#ifdef HAVE_LONG_LONG_INT
+template<> unsigned long long convert<unsigned long long>(std::string const & s);
+#endif
template<> double convert<double>(std::string const & s);
template<> int convert<int>(char const * cptr);
template<> double convert<double>(char const * cptr);
More information about the lyx-devel
mailing list