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

PrevUpHomeNext

Struct deep_copy

boost::proto::functional::deep_copy — A PolymorphicFunctionObject type for deep-copying Proto expression trees.

Synopsis

// In header: <boost/proto/deep_copy.hpp>


struct deep_copy :  proto::callable {
  // member classes/structs/unions
  template<typename This, typename Expr> 
  struct result<This(Expr)> :  result_of::deep_copy<Expr> {
  };

  // public member functions
  template<typename Expr> 
    result_of::deep_copy<Expr>::type operator()(Expr const &) const;
};

Description

A PolymorphicFunctionObject type for deep-copying Proto expression trees. When a tree is deep-copied, all internal nodes and terminals held by reference are instead held by value. The only exception is function references, which continue to be held by reference.

deep_copy public member functions

  1. template<typename Expr> 
      result_of::deep_copy<Expr>::type operator()(Expr const & expr) const;
    Deep-copies a Proto expression tree, turning all nodes and terminals held by reference into ones held by value.

PrevUpHomeNext