Ignore:
Timestamp:
Dec 15, 2008, 1:57:43 PM (12 years ago)
Author:
Peter
Message:

fixes #467 - implicit conversion between Vector and its Views are no longer allowed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/utility/VectorMutable.h

    r1551 r1651  
    220220    gsl_vector* vec_;
    221221
    222     /**
    223        Proxy class used to allow copy and assignment of VectorView. By
    224        design vectors and matrices are passed as non-const references
    225        in all constructors of VectorView. Because the standard does
    226        not allow temporary objects to be bound to non-const
    227        references, it is not possible to directly construct a
    228        VectorView from a temporary VectorView returned from a
    229        function. Instead this proxy class is created from the
    230        temporary object and then a VectorView can be created from this
    231        proxy.
    232 
    233        \see VectorView
    234      */
    235     struct proxy
    236     {
    237       /// pointer to GSL vector keeping everything we need to create a
    238       /// new VectorMutable from a proxy.
    239       gsl_vector* vec_;
    240     };
    241 
    242222  private:
    243223    // copy assignment not allowed
    244224    const VectorMutable& operator=(const VectorMutable&);
    245   public:
    246     /**
    247        conversion operator to protected proxy class.
    248      */
    249     operator proxy();
    250225
    251226  };
Note: See TracChangeset for help on using the changeset viewer.