i just now noticed that my gcc version is 6.3.0, which doesnt support c++17 standard. i tried to update it with mingw-get update and mingw-get upgrade commands on command prompt, but after running gcc -v it seems to still be on the same version, and when i use the testing code for c++17 compliance which goes as follows:
#include <array>
#include <iostream>
#include <string_view>
#include <tuple>
#include <type_traits>
namespace a::b::c
{
inline constexpr std::string_view str{ "hello" };
}
template <class... T>
std::tuple<std::size_t, std::common_type_t<T...>> sum(T... args)
{
return { sizeof...(T), (args + ...) };
}
int main()
{
auto [iNumbers, iSum]{ sum(1, 2, 3) };
std::cout << a::b::c::str << ' ' << iNumbers << ' ' << iSum << '\n';
std::array arr{ 1, 2, 3 };
std::cout << std::size(arr) << '\n';
return 0;
}
which wont build because string_view isnt recognized despite having c++17 compliance option checked in codeblocks compiler settings, which draws me to the only conclusion that my gcc is outdated. excuse me if there are any technical fallacies in my post, i am new.