...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 — A class representing a key within an environment.
// In header: <boost/process/v2/environment.hpp> struct key { // types typedef char_type value_type; typedef key_char_traits< char_type > traits_type; typedef std::basic_string< char_type, traits_type > string_type; typedef basic_string_view< char_type, traits_type > string_view_type; // public member functions key(); key(const key &) = default; key(key &&); key(const string_type &); key(string_type &&); key(const value_type *); key(value_type *); explicit key(key_view); template<typename Source> key(const Source &, decltype(std::declval< Source >().data()) = nullptr, decltype(std::declval< Source >().size()) = 0u); key(const typename conditional< is_same< value_type, char >::value, wchar_t, char >::type *); template<typename InputIt> key(InputIt, InputIt); ~key() = default; key & operator=(const key &) = default; key & operator=(key &&); key & operator=(string_type &&); template<typename Source> key & operator=(const Source &); key & assign(string_type &&); template<typename Source> key & assign(const Source &); template<typename InputIt> key & assign(InputIt, InputIt); void clear(); void swap(key &) 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; int compare(const key &) 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; const value_type * data() const; std::size_t size() const; };
key
public member functionskey();
key(const key & p) = default;
key(key && p);
key(const string_type & source);
key(string_type && source);
key(const value_type * raw);
key(value_type * raw);
explicit key(key_view kv);
template<typename Source> key(const Source & source, decltype(std::declval< Source >().data()) = nullptr, decltype(std::declval< Source >().size()) = 0u);
key(const typename conditional< is_same< value_type, char >::value, wchar_t, char >::type * raw);
template<typename InputIt> key(InputIt first, InputIt last);
~key() = default;
key & operator=(const key & p) = default;
key & operator=(key && p);
key & operator=(string_type && source);
template<typename Source> key & operator=(const Source & source);
key & assign(string_type && source);
template<typename Source> key & assign(const Source & source);
template<typename InputIt> key & assign(InputIt first, InputIt last);
void clear();
void swap(key & 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;
int compare(const key & 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;
const value_type * data() const;
std::size_t size() const;