openfoam/applications/test/CompactListList
Henry Weller 6e573ad7e8 UList: Rationalize assignment (shallow-copy vs deep-copy)
//- Disallow default shallow-copy assignment
    //
    //  Assignment of UList<T> may need to be either shallow (copy pointer)
    //  or deep (copy elements) depending on context or the particular type
    //  of list derived from UList and it is confusing and prone to error
    //  for the default assignment to be either.  The solution is to
    //  disallow default assignment and provide separate 'shallowCopy' and
    //  'deepCopy' member functions.
    void operator=(const UList<T>&) = delete;

    //- Copy the pointer held by the given UList.
    inline void shallowCopy(const UList<T>&);

    //- Copy elements of the given UList.
    void deepCopy(const UList<T>&);
2016-04-03 10:26:05 +01:00
..
Make STYLE: uniform 'Test-' prefix for all applications/test 2010-11-23 16:26:04 +01:00
Test-CompactListList.C UList: Rationalize assignment (shallow-copy vs deep-copy) 2016-04-03 10:26:05 +01:00