feat: test auto keyword

This commit is contained in:
Michael Mandl 2023-10-21 22:45:28 +02:00
parent b78b86742b
commit 9b20fc7126
Signed by: mandlm
GPG key ID: 4AA25D647AA54CC7
4 changed files with 28 additions and 2 deletions

View file

@ -0,0 +1,14 @@
#include "type_inference.h"
#include <iostream>
#include <vector>
void TypeInferenceTest::run() {
const std::vector<int> int_vec = {1, 2, 3, 4, 5};
std::cout << "vector iterator with auto: ";
for (auto it = int_vec.cbegin(); it != int_vec.cend(); ++it) {
std::cout << *it << " ";
}
std::cout << std::endl;
}