access_m_fail1.cpp 883 B

123456789101112131415161718192021222324252627282930313233343536
  1. //Copyright (c) 2008-2016 Emil Dotchevski and Reverge Studios, Inc.
  2. //Distributed under the Boost Software License, Version 1.0. (See accompanying
  3. //file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  4. #include <boost/qvm/mat_access.hpp>
  5. template <int R,int C> struct my_mat { };
  6. namespace
  7. boost
  8. {
  9. namespace
  10. qvm
  11. {
  12. template <int R,int C>
  13. struct
  14. mat_traits< my_mat<R,C> >
  15. {
  16. typedef int scalar_type;
  17. static int const rows=R;
  18. static int const cols=C;
  19. template <int Row,int Col> static int read_element( my_mat<R,C> const & );
  20. template <int Row,int Col> static int & write_element( my_mat<R,C> & );
  21. };
  22. }
  23. }
  24. int
  25. main()
  26. {
  27. using namespace boost::qvm;
  28. my_mat<1,1> const m=my_mat<1,1>();
  29. A11(m);
  30. return 1;
  31. }