Announcement

Collapse
No announcement yet.

C++14 Is Complete

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • C++14 Is Complete

    Phoronix: C++14 Is Complete

    The ISO C++14 draft international standard was unanimously approved and is now clear for publication...

    Phoronix, Linux Hardware Reviews, Linux hardware benchmarks, Linux server benchmarks, Linux benchmarking, Desktop Linux, Linux performance, Open Source graphics, Linux How To, Ubuntu benchmarks, Ubuntu hardware, Phoronix Test Suite

  • #2
    Wow, the committee is working fast nowadays. Great news. C++ is becoming much more usable with the additions and changes. I've been working with C++11 the past few months and I can't imagine going back to C++98/2003.

    Comment


    • #3
      Originally posted by Pseus View Post
      Wow, the committee is working fast nowadays. Great news. C++ is becoming much more usable with the additions and changes. I've been working with C++11 the past few months and I can't imagine going back to C++98/2003.
      The biggest part of the fight is? fighting haters, as always.

      Comment


      • #4
        I so wish that Linux had a reasonable way to use the newest C++ compilers on older systems.

        It is a nightmare making a library in C++11 that will compile and link against software built with older GCC. Weird and crazy things with -Bsymbolic and static linking of libgcc and libstdc++. It's just not worth doing. So I can't use it.

        I've got to hold back to lowest common denominator so I can build on Ubuntu 10.04 and CentOS 5. I feel so sorry for myself.

        Comment


        • #5
          Originally posted by Pseus View Post
          Wow, the committee is working fast nowadays. Great news. C++ is becoming much more usable with the additions and changes. I've been working with C++11 the past few months and I can't imagine going back to C++98/2003.
          Meanwhile, everyone continues to make their own Point and Matrix classes ... and their own numerics functions (like cross product). It's not a big deal until you start working with lots of other libraries that each have their own Point and Matrix class that you have to convert to/from.

          I seriously believe they should standardize a very basic N-D Point/Vector utility struct/class with basic operations (some of which exist with obscure names in <numeric>). The same goes with Matrix, and while contentious, I'm not suggesting to standardize some crazy sparse Matrix/Vector data structure but something that can be used to do, oh, solve small dense linear systems efficiently and in a numerically stable way. Maybe throw SVD and eigenvalue algorithms in there (everyone keeps rewriting these too ... let's see, Linpack, Lapack, OpenCV, Eigen ... am I missing any?).

          But yeah, QPoint, vnl_vector, vtkMatrix, vnl_matrix, QMatrix, boost? This is really really stupid. These utility classes and many algorithms associated with them are so common that they really should be standard.

          From a numerics point of view, C++ is still about as usable as it was back in C++03. At least they expanded on random number generators.

          Comment


          • #6
            Originally posted by nslay View Post
            QPoint
            Well, Qt maps EVERYTHING. There is QList, QMap and i am very sure there is a QMatrix no matter std::matrix exists or not ...
            I am unsure whether a standard math lib is really 100% a good thing or not...

            From a numerics point of view, C++ is still about as usable as it was back in C++03. At least they expanded on random number generators.
            Yup. VERY usable and flexible.
            Last edited by Kemosabe; 19 August 2014, 02:45 PM.

            Comment


            • #7
              Originally posted by nslay View Post
              Meanwhile, everyone continues to make their own Point and Matrix classes ... and their own numerics functions (like cross product). It's not a big deal until you start working with lots of other libraries that each have their own Point and Matrix class that you have to convert to/from.

              I seriously believe they should standardize a very basic N-D Point/Vector utility struct/class with basic operations (some of which exist with obscure names in <numeric>). The same goes with Matrix, and while contentious, I'm not suggesting to standardize some crazy sparse Matrix/Vector data structure but something that can be used to do, oh, solve small dense linear systems efficiently and in a numerically stable way. Maybe throw SVD and eigenvalue algorithms in there (everyone keeps rewriting these too ... let's see, Linpack, Lapack, OpenCV, Eigen ... am I missing any?).

              But yeah, QPoint, vnl_vector, vtkMatrix, vnl_matrix, QMatrix, boost? This is really really stupid. These utility classes and many algorithms associated with them are so common that they really should be standard.

              From a numerics point of view, C++ is still about as usable as it was back in C++03. At least they expanded on random number generators.
              I dont think adding libraries that are of use for a rather small part of the users as standard makes sense. The Java`s and DotNets already proved how much of a mess this gets with several hundred megabytes of libraries in several incompatible versions. Unless there proves to be one way to make almost everyone happy, just keep those libs external. The fact that there are numerous numerics and Linear algebra libraries kinda implies that this isnt the case.

              Just think of how you would scale down the library for use on embedded targets, where C/C++ is often the only thing available. You can adopt a C/C++ Library by providing mabye 2 dozend of functions (malloc, filedescriptors, locks, threads).
              This is the nice thing of C/C++ - it runs anywhere, pulling in libraries for every occasion will make that harder.

              Comment


              • #8
                Originally posted by Kemosabe View Post
                Well, Qt maps EVERYTHING. There is QList, QMap and i am very sure there is a QMatrix no matter std::matrix exists or not ...
                I am unsure whether a standard math lib is really 100% a good thing or not...
                You already reap the benefits of a standard math library. You can use std::sin, std::cos, std::tan, std::atan, std::atan2, std::acos, std::asin, std::sqrt, std::cbrt, std::log, std::log2, std::log10, etc...

                Did you also want to pull in your own implementation of these from external dependencies for some very common usage? Sure, there are special cases where you'd want to write your own or use an external package for performance reasons ... but we're talking the majority use case where the user has no explicit performance requirements for these.

                I think the same applies for basic linear algebra. The majority usage is probably solving small dense linear systems (oh, say 3x3, 4x4 systems), computing eigen/singular values, matrix/vector matrix/matrix multiplication, inner products, cross products, etc...



                Yup. VERY usable and flexible.
                C++11 is as flexible for numerics as it was with C++03. Nothing has changed (except for some extra functions like std::cbrt and the awesomely revamped RNG API) ... I still need to pull in dependencies to do these sorts of common computations and have to deal with several different implementations of these when using other libraries that have their own implementations. Seriously, this is dumb:

                namespace ThisLibrary {
                template<typename Tp>
                struct MyPoint {
                Tp x, y, z;
                };
                }

                namespace ThatLibrary {
                template<typename Tp>
                class YourPoint {
                private:
                Tp m_x, m_y, m_z;

                public:
                Tp & x();
                Tp & y();
                Tp & z();
                };
                }

                namespace OneOfAnyOtherThousandsOfWaysToImplementAPoint {
                ...
                }

                namespace YetAnotherMatrixPackage {
                class Matrix {
                ...
                };
                }

                This is stupid and everyone makes their own every time. These classes are probably almost as common strings (hence there's a std::string!).

                Comment


                • #9
                  Originally posted by discordian View Post
                  I dont think adding libraries that are of use for a rather small part of the users as standard makes sense. The Java`s and DotNets already proved how much of a mess this gets with several hundred megabytes of libraries in several incompatible versions. Unless there proves to be one way to make almost everyone happy, just keep those libs external. The fact that there are numerous numerics and Linear algebra libraries kinda implies that this isnt the case.

                  Just think of how you would scale down the library for use on embedded targets, where C/C++ is often the only thing available. You can adopt a C/C++ Library by providing mabye 2 dozend of functions (malloc, filedescriptors, locks, threads).
                  This is the nice thing of C/C++ - it runs anywhere, pulling in libraries for every occasion will make that harder.
                  It's not just a small part of the users. Very basic linear algebra is extremely common. I would expect more usage of basic linear algebra than I would expect use std::erf, std::tgamma, std::lgamma (for example), or the entire <complex> header.

                  No, I maintain that each library that declares its own Point and Matrix class is almost equivalent to that library making it's own String class. It's downright stupid.

                  Comment


                  • #10
                    Originally posted by nslay View Post
                    It's not just a small part of the users. Very basic linear algebra is extremely common. I would expect more usage of basic linear algebra than I would expect use std::erf, std::tgamma, std::lgamma (for example), or the entire <complex> header.
                    Basic alegra contains only addition and multiplication, or stuff like SVD, Determinant aswell? For the first, probably some generic for_each + iterators are the best solution and dont even depend on a type. The later ist so common IMHO, I would rather have some Galois field math for encrytion and error-correction than that.
                    I dont think the distributions should be in the base library either but they are easier to seperate than stuff that depends on the types you use.

                    Originally posted by nslay View Post
                    No, I maintain that each library that declares its own Point and Matrix class is almost equivalent to that library making it's own String class. It's downright stupid.
                    Which is rather common for embedded (throw anything out that might allocate/free on its own) and gamedevs. Should your Point and Matrix manage its own memory, be a template parametrized on size or even fixed dimensions, should matrixes be sparse or full or both (two separate classes or one?)
                    Theres alot of decisions that might be nice for one use but not for another.

                    If you go down this road you end up with those bloated examples that try to solve anything for everyone and logically do this in a overly generic way everyone is unhappy. QT was already brought up, if you want a full environment for everything you should look at something like it.
                    Last edited by discordian; 19 August 2014, 03:37 PM.

                    Comment

                    Working...
                    X