File: a10.cpp

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

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