Add bounds checking to class matrix
Make sure move constructor is generated for class alignment.