aboutsummaryrefslogtreecommitdiff
path: root/templates/println.cpp
blob: 62f27ac7afce39c4b6bacd42ff9e92f83c89b0c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <iostream>

template<auto X> void println() { std::cout << X << std::endl; }

int main() {
	println<1.23>();
	println<42>();

	// The following attempts to print a string do not work
	// uncomment to see why
	// 1.
	// println<"Hello!">();
	// 2.
	// constexpr std::string_view hello = "Hello!";
	// println<hello>();

	return 0;
}

Generated with cgit - Back to sebastiano.tronto.net