Closed Dingo64 closed 1 year ago
Structured binding is introduced since c++17. Do you mind sharing the gcc version and the compile command?
g++ (MinGW.org GCC-6.3.0-1) 6.3.0
set PATH=C:\mingw\bin;%PATH%
set CPATH=K:\ncnn_stable\ncnn
g++ -I "K:/ncnn_stable/" -I "K:/ncnn_stable/ncnn/" -o test test.cpp -funsafe-math-optimizations -Ofast -flto=auto -funroll-all-loops -pipe -march=native -std=c++17 -Wall -Wextra -lstdc++ -pthread -Wl,--gc-sections -flto -fopt-info-vec-optimized
This is the newest MinGW for Windows but it comes with GCC 6.3 which is old. I found out there is MinGW-w64 which comes with newer GCC and in MinGW-w64 this error is gone, so I am closing this issue.
MinGW-w64: https://winlibs.com/
I am trying to compile under Windows. I am using "-std=c++17" because that's the newest that seems to work with MinGW.
I am getting this error: