79494565

Date: 2025-03-08 15:13:55
Score: 0.5
Natty:
Report link

C++20 now allows for floating point values as template arguments

#include <iostream>

template <float x>
void foo(){
    std::cout << x << std::endl;
}

int main(){
    foo<3.0f>();
}

The above would compile with -std=c++20

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Atharva Dubey