...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
boost::process::v2::environment::key_value_pair
// In header: <boost/process/v2/environment.hpp> struct key_value_pair { // types typedef char_type value_type; typedef std::char_traits< char_type > traits_type; typedef std::basic_string< char_type > string_type; typedef basic_cstring_ref< char_type > string_view_type; // public member functions key_value_pair(); key_value_pair(const key_value_pair &) = default; key_value_pair(key_value_pair &&); key_value_pair(key_view, value_view); key_value_pair(key_view, std::initializer_list< basic_string_view< char_type > >); key_value_pair(const string_type &); key_value_pair(string_type &&); key_value_pair(const value_type *); key_value_pair(value_type *); explicit key_value_pair(key_value_pair_view); template<typename Source> key_value_pair(const Source &, decltype(std::declval< Source >().data()) = nullptr, decltype(std::declval< Source >().size()) = 0u); template<typename Key, typename Value> key_value_pair(const std::pair< Key, Value > &); key_value_pair(const typename conditional< is_same< value_type, char >::value, wchar_t, char >::type *); template<typename InputIt, typename std::iterator_traits< InputIt >::iterator_category> key_value_pair(InputIt, InputIt); ~key_value_pair() = default; key_value_pair & operator=(const key_value_pair &) = default; key_value_pair & operator=(key_value_pair &&); key_value_pair & operator=(string_type &&); template<typename Source> key_value_pair & operator=(const Source &); key_value_pair & assign(string_type &&); template<typename Source> key_value_pair & assign(const Source &); template<typename InputIt> key_value_pair & assign(InputIt, InputIt); void clear(); void swap(key_value_pair &) noexcept; const value_type * c_str() const noexcept; const string_type & native() const noexcept; string_view_type native_view() const noexcept; operator string_type() const; operator string_view_type() const; operator typename string_view_type::string_view_type() const; operator key_value_pair_view() const; int compare(const key_value_pair &) const noexcept; int compare(const string_type &) const; int compare(string_view_type) const; int compare(const value_type *) const; template<typename CharT, typename Traits = std::char_traits<CharT>, typename Alloc = std::allocator<CharT> > std::basic_string< CharT, Traits, Alloc > basic_string(const Alloc & = Alloc()) const; std::string string() const; std::wstring wstring() const; const string_type & native_string() const; bool empty() const; struct key_view key() const; struct value_view value() const; const value_type * data() const; std::size_t size() const; template<std::size_t Idx> virtual auto get() const = 0; template<> virtual key_view get() const = 0; template<> virtual value_view get() const = 0; };
key_value_pair
public member functionskey_value_pair();
key_value_pair(const key_value_pair & p) = default;
key_value_pair(key_value_pair && p);
key_value_pair(key_view key, value_view value);
key_value_pair(key_view key, std::initializer_list< basic_string_view< char_type > > values);
key_value_pair(const string_type & source);
key_value_pair(string_type && source);
key_value_pair(const value_type * raw);
key_value_pair(value_type * raw);
explicit key_value_pair(key_value_pair_view kv);
template<typename Source> key_value_pair(const Source & source, decltype(std::declval< Source >().data()) = nullptr, decltype(std::declval< Source >().size()) = 0u);
template<typename Key, typename Value> key_value_pair(const std::pair< Key, Value > & kv);
key_value_pair(const typename conditional< is_same< value_type, char >::value, wchar_t, char >::type * raw);
template<typename InputIt, typename std::iterator_traits< InputIt >::iterator_category> key_value_pair(InputIt first, InputIt last);
~key_value_pair() = default;
key_value_pair & operator=(const key_value_pair & p) = default;
key_value_pair & operator=(key_value_pair && p);
key_value_pair & operator=(string_type && source);
template<typename Source> key_value_pair & operator=(const Source & source);
key_value_pair & assign(string_type && source);
template<typename Source> key_value_pair & assign(const Source & source);
template<typename InputIt> key_value_pair & assign(InputIt first, InputIt last);
void clear();
void swap(key_value_pair & other) noexcept;
const value_type * c_str() const noexcept;
const string_type & native() const noexcept;
string_view_type native_view() const noexcept;
operator string_type() const;
operator string_view_type() const;
operator typename string_view_type::string_view_type() const;
operator key_value_pair_view() const;
int compare(const key_value_pair & p) const noexcept;
int compare(const string_type & str) const;
int compare(string_view_type str) const;
int compare(const value_type * s) const;
template<typename CharT, typename Traits = std::char_traits<CharT>, typename Alloc = std::allocator<CharT> > std::basic_string< CharT, Traits, Alloc > basic_string(const Alloc & alloc = Alloc()) const;
std::string string() const;
std::wstring wstring() const;
const string_type & native_string() const;
bool empty() const;
struct key_view key() const;
struct value_view value() const;
const value_type * data() const;
std::size_t size() const;
template<std::size_t Idx> virtual auto get() const = 0;
template<> virtual key_view get() const = 0;
template<> virtual value_view get() const = 0;