File: diagonal_on_const_type_actually_const.cpp

package info (click to toggle)
feel++ 1:0.99.0-final.1-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 129,788 kB
  • ctags: 70,749
  • sloc: cpp: 440,566; ansic: 62,349; sh: 44,830; fortran: 29,974; makefile: 3,211; python: 2,265; yacc: 766; java: 632; xml: 265; lex: 202; lisp: 100
file content (16 lines) | stat: -rw-r--r-- 250 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include "../Eigen/Core"

#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
#define CV_QUALIFIER const
#else
#define CV_QUALIFIER
#endif

using namespace Eigen;

void foo(){
    MatrixXf m;
    Diagonal<CV_QUALIFIER MatrixXf>(m).coeffRef(0) = 1.0f;
}

int main() {}