File: a9.cpp

package info (click to toggle)
fast-float 8.0.0-0.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 872 kB
  • sloc: cpp: 6,819; ansic: 3,414; python: 366; sh: 37; makefile: 8
file content (11 lines) | stat: -rw-r--r-- 258 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
#include "fast_float/fast_float.h"

double get9(char const *input) {
  double result_value;
  auto result =
      fast_float::from_chars(input, input + strlen(input), result_value);
  if (result.ec != std::errc()) {
    return 9;
  }
  return result_value;
}