mirror of
https://github.com/catchorg/Catch2.git
synced 2025-08-01 12:55:40 +02:00
Updated Clara with VS ICE workaround
This commit is contained in:
14
third_party/clara.hpp
vendored
14
third_party/clara.hpp
vendored
@@ -29,7 +29,7 @@
|
||||
#include <vector>
|
||||
|
||||
#ifndef CLARA_TEXTFLOW_CONFIG_CONSOLE_WIDTH
|
||||
#define CLARA_TEXTFLOW_CONFIG_CONSOLE_WIDTH
|
||||
#define CLARA_TEXTFLOW_CONFIG_CONSOLE_WIDTH 80
|
||||
#endif
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace clara { namespace TextFlow
|
||||
|
||||
class Column {
|
||||
std::vector<std::string> m_strings;
|
||||
size_t m_width = TEXTFLOW_CONFIG_CONSOLE_WIDTH;
|
||||
size_t m_width = CLARA_TEXTFLOW_CONFIG_CONSOLE_WIDTH;
|
||||
size_t m_indent = 0;
|
||||
size_t m_initialIndent = std::string::npos;
|
||||
|
||||
@@ -782,9 +782,7 @@ namespace detail {
|
||||
public:
|
||||
virtual ~ParserBase() = default;
|
||||
virtual auto validate() const -> Result { return Result::ok(); }
|
||||
|
||||
virtual auto parse( std::string const& exeName, TokenStream const &tokens) const -> InternalParseResult = 0;
|
||||
|
||||
virtual auto cardinality() const -> size_t { return 1; }
|
||||
|
||||
auto parse(Args const &args) const -> InternalParseResult {
|
||||
@@ -923,13 +921,17 @@ namespace detail {
|
||||
std::vector<std::string> m_optNames;
|
||||
|
||||
public:
|
||||
using ParserRefImpl::ParserRefImpl;
|
||||
|
||||
template<typename LambdaT>
|
||||
explicit Opt( LambdaT const &ref ) : ParserRefImpl(std::make_shared<BoundFlagLambda<LambdaT>>(ref)) {}
|
||||
|
||||
explicit Opt( bool &ref ) : ParserRefImpl(std::make_shared<BoundFlagRef>(ref)) {}
|
||||
|
||||
template<typename LambdaT>
|
||||
Opt( LambdaT const &ref, std::string const &hint ) : ParserRefImpl( ref, hint ) {}
|
||||
|
||||
template<typename T>
|
||||
Opt( T &ref, std::string const &hint ) : ParserRefImpl( ref, hint ) {}
|
||||
|
||||
auto operator[](std::string const &optName) -> Opt & {
|
||||
m_optNames.push_back(optName);
|
||||
return *this;
|
||||
|
Reference in New Issue
Block a user