C++17 structured binding that also includes an existing variable

#include <iostream>
#include <limits>
#include <tuple>

int main()
{
    auto step = std::numeric_limits<double>::infinity();
    auto as = std::numeric_limits<int>::infinity();

    std::tie(step, as) = std::tuple{ 0.1, 2 };
    std::cout << step << ", " << as << std::endl;
}

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)