Loading ...
Sorry, an error occurred while loading the content.
 

#include vector_proxy.hpp

Expand Messages
  • Toon Knapen
    Including vector_proxy without first including vector.hpp results in a zillion errors. Should nt #include be added in
    Message 1 of 4 , Jun 2, 2003
      Including vector_proxy without first including vector.hpp results
      in a zillion errors. Should'nt '#include <boost/numeric/ublas/vector.hpp>'
      be added in vector_proxy.hpp ?

      toon
    • jhr.walter@t-online.de
      Hi Toon, ... Yes. ... This would mean a kind of cyclic dependency between header files, but should be possible. Do you have a use case for this (i.e. needing a
      Message 2 of 4 , Jun 2, 2003
        Hi Toon,

        you wrote:

        > Including vector_proxy without first including vector.hpp results
        > in a zillion errors.

        Yes.

        > Should'nt '#include <boost/numeric/ublas/vector.hpp>'
        > be added in vector_proxy.hpp ?

        This would mean a kind of cyclic dependency between header files, but should
        be possible. Do you have a use case for this (i.e. needing a vector_range
        without a vector/matrix for example)?

        Thanks,

        Joerg

        P.S.: Generally I view

        ublas/config.hpp
        ublas/vector.hpp
        ublas/matrix.hpp
        ublas/triangular.hpp
        ublas/banded.hpp
        ublas/symmetric.hpp
        ublas/hermitian.hpp
        ublas/vector_sparse.hpp
        ublas/matrix_sparse.hpp
        ublas/io.hpp

        as 'public' headers. W.r.t. some others (like operation.hpp) I'm still
        unsure.
      • Toon Knapen
        ... First IMHO every include file should be include all its dependencies himself such that just including a file does not generate errors (is btw also a `boost
        Message 3 of 4 , Jun 3, 2003
          On Tuesday 03 June 2003 08:46, jhr.walter@... wrote:

          > Do you have a use case for this (i.e. needing a vector_range
          > without a vector/matrix for example)?
          First IMHO every include file should be include all its dependencies
          himself such that just including a file does not generate errors (is btw
          also a `boost header policy`)
          Second, you can't rely on the user to include files in some specific
          order.

          > This would mean a kind of cyclic dependency between header files, but should
          > be possible.
          Yes but it would make more sense that vector_proxy includes vector instead
          of the other way around ? Views must refer to the original container but
          containers do not have to be aware of views that are defined on them.

          toon
        • jhr.walter@t-online.de
          Hi Toon, ... OK. ... OK. ... should ... OK. I don t like the idea of a program looking like #include int main() {
          Message 4 of 4 , Jun 5, 2003
            Hi Toon,

            you wrote:

            > > Do you have a use case for this (i.e. needing a vector_range
            > > without a vector/matrix for example)?
            > First IMHO every include file should be include all its dependencies
            > himself such that just including a file does not generate errors (is btw
            > also a `boost header policy`)

            OK.

            > Second, you can't rely on the user to include files in some specific
            > order.

            OK.

            > > This would mean a kind of cyclic dependency between header files, but
            should
            > > be possible.
            > Yes but it would make more sense that vector_proxy includes vector instead
            > of the other way around ? Views must refer to the original container but
            > containers do not have to be aware of views that are defined on them.

            OK. I don't like the idea of a program looking like

            #include <boost/numeric/ublas/vector_proxy.hpp>

            int main() {
            vector<double> v;
            }

            but I'll try to add that dependency (you gave convincing arguments).

            Thanks,

            Joerg
          Your message has been successfully submitted and would be delivered to recipients shortly.