diff --git a/cpp/QrSegment.cpp b/cpp/QrSegment.cpp index 2ae2242..db0e894 100644 --- a/cpp/QrSegment.cpp +++ b/cpp/QrSegment.cpp @@ -129,6 +129,13 @@ qrcodegen::QrSegment::QrSegment(const Mode &md, int numCh, const std::vector &segs, int version) { if (version < 1 || version > 40) throw "Version number out of range"; diff --git a/cpp/QrSegment.hpp b/cpp/QrSegment.hpp index 77ed910..c64ab54 100644 --- a/cpp/QrSegment.hpp +++ b/cpp/QrSegment.hpp @@ -27,6 +27,9 @@ #include #include +#if defined(_MSC_VER) && _MSC_VER < 1800 +#define final +#endif namespace qrcodegen { @@ -144,6 +147,8 @@ class QrSegment final { */ public: QrSegment(const Mode &md, int numCh, const std::vector &b, int bitLen); + // Required in the instantiation of std::vector. + QrSegment &operator=(const QrSegment &seg); // Package-private helper function. public: static int getTotalBits(const std::vector &segs, int version);