fork download
  1. #include <cmath>
  2. #include <iostream>
  3. using namespace std;
  4.  
  5. template <typename T>
  6. const auto PI = std::acos(static_cast<T>(-1));
  7.  
  8. int main() {
  9. auto func = []() { cout << PI<float> << endl; };
  10.  
  11. func();
  12. }
Success #stdin #stdout 0s 4452KB
stdin
Standard input is empty
stdout
3.14159