From fbd067e69eb6742c96dd2b94567b1d717ede7035 Mon Sep 17 00:00:00 2001 From: Brett Laptop Date: Mon, 9 Oct 2023 21:50:41 -0400 Subject: [PATCH] add ability for std::string in args.get --- include/blt/parse/argparse.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/blt/parse/argparse.h b/include/blt/parse/argparse.h index 2a37ba1..78cc880 100755 --- a/include/blt/parse/argparse.h +++ b/include/blt/parse/argparse.h @@ -341,7 +341,10 @@ namespace blt template inline T get(const std::string& key) { - return blt::arg_parse::get_cast(data[key]); + if constexpr (std::is_same_v) + return blt::arg_parse::get(data[key]); + else + return blt::arg_parse::get_cast(data[key]); } inline auto begin()