access_q_fail.cpp 776 B

1234567891011121314151617181920212223242526272829303132333435
  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/quat_access.hpp>
  5. #include <boost/qvm/vec_access.hpp>
  6. struct my_quat { };
  7. namespace
  8. boost
  9. {
  10. namespace
  11. qvm
  12. {
  13. template <>
  14. struct
  15. quat_traits<my_quat>
  16. {
  17. typedef int scalar_type;
  18. template <int I> static int read_element( my_quat const & );
  19. template <int I> static int & write_element( my_quat & );
  20. };
  21. }
  22. }
  23. int
  24. main()
  25. {
  26. using namespace boost::qvm;
  27. my_quat const q=my_quat();
  28. A<3>(V(q));
  29. return 1;
  30. }