Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build Issue '_is_iterator_v' is not a member of 'std' #13

Open
silversheart opened this issue Mar 28, 2024 · 6 comments
Open

Build Issue '_is_iterator_v' is not a member of 'std' #13

silversheart opened this issue Mar 28, 2024 · 6 comments

Comments

@silversheart
Copy link

Hi! I need so much your library, but can't build it in Qt 6.6.3. In 'QJsonArrayInserter.h', row 33, where we have

/** @brief Creates a new QJsonArray with the contents of the range [first, last) */
        template<typename Iterator>
            requires std::_Is_iterator_v<Iterator>
        static QJsonArray make(Iterator begin, Iterator end);

compiler throws a build issue '_is_iterator_v' is not a member of 'std'. I tried to find this template '_Is_iterator_v' in cppreference.com and cplusplus.com but don't give any results! Also I tried recent gcc compiler (14.0.1) with the same result.
Can you advise how to compile the library in Qt 6.6.3 (and for Ubuntu 22.04 LTS in particular)?
Best regards, Oleksiy.

@Modersi
Copy link
Owner

Modersi commented Mar 28, 2024 via email

@silversheart
Copy link
Author

silversheart commented Mar 28, 2024

Подивився ваш профіль в Лінкедінє і вирішив переписати повідомлення рідною мовою.
Тут ще й коду то немає. Перед тим як підключити бібліотеку до проєкту, її ж треба зібрати з джерел! Я клоню проєкт, відкриваю його в Qt намагаюсь компілювати і отримую власне сабж. До коду справа ще не дійшла. Спочатку думав, що компілятор не підтримує версію С++ - зібрав GCC останньої версії - нічого не змінилось. Думаю знайду в документації С++ що це за темплейт, може одруківка, може зможу використати щось рідне з
Qt - так і в документації немає такого _Is_iterator_v. Ось і прошу поради, що треба зробити щоб бібліотека зкомпілювалась.

@Modersi
Copy link
Owner

Modersi commented Mar 28, 2024 via email

@kleuter
Copy link

kleuter commented Apr 5, 2024

Same problem guys, had to comment this requires line
requires std::_Is_iterator_v

Seems like _Is_iterator_v is a Visual Studio thing

@kleuter
Copy link

kleuter commented Apr 5, 2024

Additionally, there's also (also Ubuntu 23.04)

/home/me/downloader-bot/TelegramBotAPI/./Internal/Utility/QHttpMultiPartInserter.hpp:7:119: error: cannot declare member function ‘static std::unique_ptr<QHttpMultiPart> Utility::QHttpMultiPartInserter::make(std::span<QString>, Args&& ...)’ to have static linkage [-fpermissive]
    7 | static std::unique_ptr<QHttpMultiPart> Utility::QHttpMultiPartInserter::make(std::span<QString> keys, Args&&... values) {
      |                                                                                                                       ^
In file included from /home/me/downloader-bot/TelegramBotAPI/Internal/Utility/QJsonObjectInserter.h:80,
                 from /home/me/downloader-bot/TelegramBotAPI/Bot.cpp:4:
/home/me/downloader-bot/TelegramBotAPI/./Internal/Utility/QJsonObjectInserter.hpp:8:96: error: cannot declare member function ‘static QJsonObject Utility::QJsonObjectInserter::make(std::span<QString>, Args&& ...)’ to have static linkage [-fpermissive]
    8 | static QJsonObject Utility::QJsonObjectInserter::make(std::span<QString> keys, Args&&... values) {
      |                                                                                                ^
gmake[2]: *** [TelegramBotAPI/CMakeFiles/TelegramBotAPI.dir/build.make:90: TelegramBotAPI/CMakeFiles/TelegramBotAPI.dir/Bot.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:170: TelegramBotAPI/CMakeFiles/TelegramBotAPI.dir/all] Error 2
gmake: *** [Makefile:91: all] Error 2
me@pi5:~/downloader-bot/TelegramBotAPI$

@anteok
Copy link

anteok commented Oct 18, 2024

Hello!
Seems like that issue is still actual - I cannot cmake the project too.

@kleuter thank you for your notices - commenting requires std::_Is_iterator_vand deleting static definition of QJsonObject Utility::QJsonObjectInserter::make actually helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants