From a8e2823d687dc2c7e1f771ad3c310c619e77ccae Mon Sep 17 00:00:00 2001 From: Sean Robinson Date: Thu, 11 Aug 2022 13:35:14 -0700 Subject: [PATCH] Replace constexpr generic_strtod with inline const clang-ci >= 13.0 is failing to compile a constexpr function pointer assignment. This is possibly due to strtof (and family) not being implemented as constexpr in the relevant libc++. Closes #136 Closes #156 Signed-off-by: Sean Robinson --- include/argparse/argparse.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/argparse/argparse.hpp b/include/argparse/argparse.hpp index 569704e..b88ac63 100644 --- a/include/argparse/argparse.hpp +++ b/include/argparse/argparse.hpp @@ -246,10 +246,10 @@ template struct parse_number { namespace { -template constexpr auto generic_strtod = nullptr; -template <> constexpr auto generic_strtod = strtof; -template <> constexpr auto generic_strtod = strtod; -template <> constexpr auto generic_strtod = strtold; +template inline const auto generic_strtod = nullptr; +template <> inline const auto generic_strtod = strtof; +template <> inline const auto generic_strtod = strtod; +template <> inline const auto generic_strtod = strtold; } // namespace