From 008c2ae0a52aaa485d6cb830ad54bc6466733298 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ho=C5=99e=C5=88ovsk=C3=BD?= Date: Fri, 9 Mar 2018 10:29:11 +0100 Subject: [PATCH] v1.1.4 --- README.md | 2 +- include/clara.hpp | 2 +- single_include/clara.hpp | 7 ++++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 1e80e45..dd83200 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Clara v1.1.3 +# Clara v1.1.4 [![Build Status](https://travis-ci.org/catchorg/Clara.svg?branch=master)](https://travis-ci.org/catchorg/Clara) [![Build status](https://ci.appveyor.com/api/projects/status/github/catchorg/Clara?brach=master&svg=true)](https://ci.appveyor.com/project/catchorg/clara) [![codecov](https://codecov.io/gh/catchorg/Clara/branch/master/graph/badge.svg)](https://codecov.io/gh/catchorg/Clara) diff --git a/include/clara.hpp b/include/clara.hpp index 8bcb3b0..fddfac6 100644 --- a/include/clara.hpp +++ b/include/clara.hpp @@ -5,7 +5,7 @@ // // See https://github.com/philsquared/Clara for more details -// Clara v1.1.3 +// Clara v1.1.4 #ifndef CLARA_HPP_INCLUDED #define CLARA_HPP_INCLUDED diff --git a/single_include/clara.hpp b/single_include/clara.hpp index 257ba10..43568ce 100644 --- a/single_include/clara.hpp +++ b/single_include/clara.hpp @@ -5,7 +5,7 @@ // // See https://github.com/philsquared/Clara for more details -// Clara v1.1.3 +// Clara v1.1.4 #ifndef CLARA_HPP_INCLUDED #define CLARA_HPP_INCLUDED @@ -21,6 +21,7 @@ #ifndef CLARA_CONFIG_OPTIONAL_TYPE #ifdef __has_include #if __has_include() && __cplusplus >= 201703L +#include #define CLARA_CONFIG_OPTIONAL_TYPE std::optional #endif #endif @@ -665,11 +666,11 @@ namespace detail { } #ifdef CLARA_CONFIG_OPTIONAL_TYPE template - inline auto convertInto( std::string const &source, std::optional& target ) -> ParserResult { + inline auto convertInto( std::string const &source, CLARA_CONFIG_OPTIONAL_TYPE& target ) -> ParserResult { T temp; auto result = convertInto( source, temp ); if( result ) - target = temp; + target = std::move(temp); return result; } #endif // CLARA_CONFIG_OPTIONAL_TYPE