mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-07-09 22:51:51 +08:00
Ref<> objects must be nested by reference because they potentially store a temporary object
(transplanted from 6719e56b5bfe9ae4badc9a6e894c5824f663d62e )
This commit is contained in:
parent
47a7de7b53
commit
b56348046f
@ -94,7 +94,8 @@ struct traits<Ref<_PlainObjectType, _Options, _StrideType> >
|
|||||||
typedef _PlainObjectType PlainObjectType;
|
typedef _PlainObjectType PlainObjectType;
|
||||||
typedef _StrideType StrideType;
|
typedef _StrideType StrideType;
|
||||||
enum {
|
enum {
|
||||||
Options = _Options
|
Options = _Options,
|
||||||
|
Flags = traits<Map<_PlainObjectType, _Options, _StrideType> >::Flags | NestByRefBit
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename Derived> struct match {
|
template<typename Derived> struct match {
|
||||||
|
@ -14,9 +14,9 @@
|
|||||||
|
|
||||||
static int nb_temporaries;
|
static int nb_temporaries;
|
||||||
|
|
||||||
inline void on_temporary_creation(int size) {
|
inline void on_temporary_creation(int) {
|
||||||
// here's a great place to set a breakpoint when debugging failures in this test!
|
// here's a great place to set a breakpoint when debugging failures in this test!
|
||||||
if(size!=0) nb_temporaries++;
|
nb_temporaries++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user