Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:

LAB1 / Исходники / 2.18.non.type.template.auto_changkunmodern-cpp-tutorial_GNAQ

.cpp
Скачиваний:
0
Добавлен:
03.11.2023
Размер:
358 б
Скачать
//
// 2.18.non.type.template.auto.cpp
// chapter 2 language usability
// modern cpp tutorial
//
// created by changkun at changkun.de
// https://github.com/changkun/modern-cpp-tutorial
//

#include <iostream>

template <auto value> void foo() {
    std::cout << value << std::endl;
    return;
}

int main() {
    foo<10>(); // value is deduced as type int
}