Ad
Code
Diff
  • template<typename T>
    bool above_two(T& arg){
      static_assert(std::is_arithmetic<T>::value, "arg must be a arithmetic type");
      
      if(arg <= T(2)) arg = T(3);
      
      return true;
    }
    • template<typename T>
    • bool above_two(T& arg){
    • static_assert(std::is_arithmetic<T>::value, "arg must be a arithmetic type");
    • if(arg <= T(2)){
    • arg = T(3);
    • }
    • if(arg <= T(2)) arg = T(3);
    • return true;
    • }