Skip to content
Snippets Groups Projects
  1. Oct 09, 2015
  2. Oct 01, 2015
  3. Sep 29, 2015
  4. Sep 28, 2015
  5. Sep 12, 2015
  6. Sep 04, 2015
  7. Sep 03, 2015
  8. Sep 01, 2015
  9. Aug 18, 2015
  10. Aug 17, 2015
  11. Aug 16, 2015
  12. Aug 15, 2015
  13. Aug 13, 2015
  14. Aug 12, 2015
    • Oliver Sander's avatar
      Improve code documentation · 3acd7af5
      Oliver Sander authored
      3acd7af5
    • Oliver Sander's avatar
      Simplify code by using new method MultiTypeBlockVector::size · f32ccd78
      Oliver Sander authored
      We replace constructs like (if T is a MultiTypeBlockVector)
      
      mpl::size<T>::value
      
      by
      
      T::size()
      
      which I find easier to read.  Besides, using size() hides the fact that
      boost::fusion is used for the implementation.
      f32ccd78
    • Oliver Sander's avatar
      Implement pseudo-operator[] for MultiTypeBlockVector · 6fcfa07f
      Oliver Sander authored
      This method mimicks the behavior of normal vector access with square brackets like, e.g., v[5] = 1.
      The problem is that the return type is different for each value of the argument in the brackets.
      Therefore we implement a trick using std::integral_constant.  To access the first entry of
      a MultiTypeBlockVector named v write
      
        MultiTypeBlockVector<A,B,C,D> v;
        std::integral_constant<int,0> _0;
        v[_0] = ...
      
      The name '_0' used here as a static replacement of the integer number zero is arbitrary.
      Any other variable name can be used.  If you don't like the separate variable, you can writee
      
        MultiTypeBlockVector<A,B,C,D> v;
        v[std::integral_constant<int,0>()] = ...
      6fcfa07f
  15. Aug 11, 2015
  16. Aug 10, 2015
Loading