3
0
mirror of https://github.com/triqs/dft_tools synced 2024-12-27 06:43:40 +01:00
dft_tools/doc/reference/gfs/c++/gf_assign.rst
tayral edd1ff4529 Restructuring documentation.
A first general restructuration of the doc according to the pattern [tour|tutorial|reference].
In the reference part, objects are documented per topic.
In each topic, [definition|c++|python|hdf5] (not yet implemented)
2014-10-18 12:21:08 +01:00

40 lines
719 B
ReStructuredText

.. highlight:: c
.. _gf_reg_assign:
Assignment
=========================
**Synopsis** ::
gf & operator=(gf const & X); (1)
template<??? RHS> gf & operator=(RHS const & X); (2)
The container have a quite general assignment operator.
* (1) just make a copy of X into *\*this*.
* (2) **RHS** can be anything that models the :ref:`???` concept
.. warning::
In both cases, if needed, the container is resized.
Hence **assignment invalidates all pointers and views to it**.
Move assign operator
---------------------------
**Synopsis** ::
gf & operator=(gf && X);
Standard move assign operator.
Move the data of X as data of `*this`.