access_v_fail1.cpp 802 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/vec_access.hpp>
  5. template <int D> struct my_vec { };
  6. namespace
  7. boost
  8. {
  9. namespace
  10. qvm
  11. {
  12. template <int D>
  13. struct
  14. vec_traits< my_vec<D> >
  15. {
  16. typedef int scalar_type;
  17. static int const dim=D;
  18. template <int I> static int read_element( my_vec<D> const & );
  19. template <int I> static int & write_element( my_vec<D> & );
  20. };
  21. }
  22. }
  23. int
  24. main()
  25. {
  26. using namespace boost::qvm;
  27. my_vec<1> const v=my_vec<1>();
  28. A1(v);
  29. return 1;
  30. }