summaryrefslogtreecommitdiffstats
path: root/Tests/CompileFeatures/cxx_variable_templates.cpp
blob: 5d4bdbc3550a1f13fcef3e64e13a245697bb06e9 (plain)
1
2
3
4
5
6
7
8
9
10

template<typename T>
constexpr T pi = T(3.1415926535897932385);

int someFunc()
{
  auto pi_int = pi<int>;
  auto pi_float = pi<float>;
  return pi_int - 3;
}