Skip to content

Commit bc621a9

Browse files
Fix compilation on VS2017 (#1143)
The compiler complains about C2131: expression did not evaluate to a constant. https://godbolt.org/z/a198P3bdM --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent a8d6b84 commit bc621a9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

include/CLI/impl/StringTools_inl.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,11 @@ CLI11_INLINE std::size_t close_sequence(const std::string &str, std::size_t star
327327
return close_string_quote(str, start, closure_char);
328328
case 1:
329329
case 2:
330+
#if defined(_MSC_VER) && _MSC_VER < 1920
331+
case(std::size_t)-1:
332+
#else
330333
case std::string::npos:
334+
#endif
331335
return close_literal_quote(str, start, closure_char);
332336
default:
333337
break;

0 commit comments

Comments
 (0)