Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for a snapshot of the develop branch, built from commit 2ef9bb34b9.
PrevUpHomeNext

Struct value_view

boost::process::v2::environment::value_view — A view for a value in an environment.

Synopsis

// In header: <boost/process/v2/environment.hpp>


struct value_view {
  // types
  typedef char_type                                                      value_type;      
  typedef basic_cstring_ref< char_type, value_char_traits< char_type > > string_view_type;
  typedef std::basic_string< char_type, value_char_traits< char_type > > string_type;     
  typedef value_char_traits< char_type >                                 traits_type;     

  // construct/copy/destruct
  value_view();
  value_view(const value_view &) = default;
  value_view(value_view &&);
  template<typename Source, 
           typename  = typename std::enable_if<is_constructible<string_view_type, Source>::value>::type> 
    value_view(const Source &);
  value_view(const char_type *);
  value_view(char_type *);
  value_view & operator=(const value_view &) = default;
  value_view & operator=(value_view &&);
  value_view & operator=(string_view_type);
  ~value_view() = default;

  // public member functions
  void swap(value_view &) noexcept;
  string_view_type native() const noexcept;
  operator string_view_type() const;
  operator typename string_view_type::string_view_type() const;
  int compare(const value_view &) const noexcept;
  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;
  string_type native_string() const;
  bool empty() const;
  value_iterator begin() const;
  value_iterator end() const;
  const char_type * c_str();
  const value_type * data() const;
  std::size_t size() const;
};

Description

value_view public construct/copy/destruct

  1. value_view();
  2. value_view(const value_view & p) = default;
  3. value_view(value_view && p);
  4. template<typename Source, 
             typename  = typename std::enable_if<is_constructible<string_view_type, Source>::value>::type> 
      value_view(const Source & source);
  5. value_view(const char_type * p);
  6. value_view(char_type * p);
  7. value_view & operator=(const value_view & p) = default;
  8. value_view & operator=(value_view && p);
  9. value_view & operator=(string_view_type source);
  10. ~value_view() = default;

value_view public member functions

  1. void swap(value_view & other) noexcept;
  2. string_view_type native() const noexcept;
  3. operator string_view_type() const;
  4. operator typename string_view_type::string_view_type() const;
  5. int compare(const value_view & p) const noexcept;
  6. int compare(string_view_type str) const;
  7. int compare(const value_type * s) const;
  8. 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;
  9. std::string string() const;
  10. std::wstring wstring() const;
  11. string_type native_string() const;
  12. bool empty() const;
  13. value_iterator begin() const;
  14. value_iterator end() const;
  15. const char_type * c_str();
  16. const value_type * data() const;
  17. std::size_t size() const;

PrevUpHomeNext