Skip to content

Commit

Permalink
Merge branch 'develop' into potpourri
Browse files Browse the repository at this point in the history
  • Loading branch information
klemens-morgenstern authored Jun 13, 2023
2 parents f8b7bf9 + 70c7ae6 commit cd0adf5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions include/boost/process/environment.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ class basic_environment_impl : public Implementation<Char>
while (*p != nullptr)
{
const std::size_t len = std::char_traits<Char>::length(*p);

if ((std::distance(st1.begin(), st1.end()) < len)
&& std::equal(st1.begin(), st1.end(), *p))
break;
Expand Down
16 changes: 8 additions & 8 deletions include/boost/process/v2/environment.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -502,8 +502,8 @@ struct key

template< class Source >
key( const Source& source,
decltype(source.data()) = nullptr,
decltype(source.size()) = 0u)
decltype(std::declval<Source>().data()) = nullptr,
decltype(std::declval<Source>().size()) = 0u)
: value_(
BOOST_PROCESS_V2_NAMESPACE::detail::conv_string<char_type, traits_type>(
source.data(), source.size()))
Expand Down Expand Up @@ -725,8 +725,8 @@ struct value

template< class Source >
value( const Source& source,
decltype(source.data()) = nullptr,
decltype(source.size()) = 0u)
decltype(std::declval<Source>().data()) = nullptr,
decltype(std::declval<Source>().size()) = 0u)
: value_(BOOST_PROCESS_V2_NAMESPACE::detail::conv_string<char_type, traits_type>(
source.data(), source.size()))
{
Expand Down Expand Up @@ -975,8 +975,8 @@ struct key_value_pair

template< class Source >
key_value_pair( const Source& source,
decltype(source.data()) = nullptr,
decltype(source.size()) = 0u)
decltype(std::declval<Source>().data()) = nullptr,
decltype(std::declval<Source>().size()) = 0u)
: value_(BOOST_PROCESS_V2_NAMESPACE::detail::conv_string<char_type, traits_type>(
source.data(), source.size()))
{
Expand Down Expand Up @@ -1744,8 +1744,8 @@ struct process_environment
return build_env(env_buffer);
}

process_environment(std::initializer_list<string_view> sv) : unicode_env{build_env(sv, "")} {}
process_environment(std::initializer_list<wstring_view> sv) : unicode_env{build_env(sv, L"")} {}
process_environment(std::initializer_list<string_view> sv) : unicode_env{build_env(sv)} {}
process_environment(std::initializer_list<wstring_view> sv) : unicode_env{build_env(sv)} {}

template<typename Args>
process_environment(Args && args) : unicode_env{build_env(std::forward<Args>(args))}
Expand Down

0 comments on commit cd0adf5

Please sign in to comment.