3
0
mirror of https://github.com/triqs/dft_tools synced 2024-12-26 14:23:38 +01:00
dft_tools/triqs/arrays/impl
Olivier Parcollet 5128126055 arrays: change operator() && for const_view
Changed operator()(int, int...) && for array, and views.

- For const_view and regular type, returns value_type (i.e. a copy).
  NB : does make a copy, not a move. Ok for scalar type. TODO: think for complicated types.
  This allows codes like :
  f(x)(0,0) where f : x-> matrix or const_view
  to be correct in clef expression evaluation.

- For _view : return a value_type &, as before to allow :
    A(....)(0,0) = rhs;
  It is not possible to detect dangling refs in that case at compile time.
  Added a security in TRIQS_ARRAYS_DEBUG mode to detect a dangling ref at run time,
  i.e. the case where the view is "unique" (ref count ==1).
  This would be a quite bad design anyway ...

- also :

 - clean operator[] for vector (old workaround for old gcc...)
 - add IsView flag in ISP impl class, for the impl. of operator() &&
2014-03-02 17:11:48 +01:00
..
assignment.hpp arrays : fix matrix = scalar for complex types 2014-02-12 21:50:58 +01:00
common.hpp arrays: clean cache, add traits ... 2013-11-18 23:41:32 +01:00
exceptions.hpp First commit : triqs libs version 1.0 alpha1 2013-07-17 19:24:07 +02:00
flags.hpp implement array_const_view 2013-10-21 15:12:53 +02:00
indexmap_storage_pair.hpp arrays: change operator() && for const_view 2014-03-02 17:11:48 +01:00
iterator_adapter.hpp First commit : triqs libs version 1.0 alpha1 2013-07-17 19:24:07 +02:00
make_const.hpp First commit : triqs libs version 1.0 alpha1 2013-07-17 19:24:07 +02:00
traits.hpp arrays: clean cache, add traits ... 2013-11-18 23:41:32 +01:00