Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: C++14 Is Complete

  1. #1
    Join Date
    Jan 2007
    Posts
    15,638

    Default 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...

    http://www.phoronix.com/vr.php?view=MTc2NjY

  2. #2
    Join Date
    Dec 2007
    Posts
    138

    Default

    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.

  3. #3
    Join Date
    Nov 2012
    Location
    France
    Posts
    625

    Default

    Quote 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.

  4. #4
    Join Date
    Jan 2012
    Posts
    83

    Unhappy

    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.

  5. #5
    Join Date
    Jun 2012
    Posts
    117

    Default

    Quote 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.

  6. #6
    Join Date
    Sep 2013
    Posts
    168

    Default

    Quote 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; 08-19-2014 at 03:45 PM.

  7. #7
    Join Date
    Sep 2009
    Posts
    69

    Default

    Quote 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.

  8. #8
    Join Date
    Jun 2012
    Posts
    117

    Default

    Quote 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!).

  9. #9
    Join Date
    Jun 2012
    Posts
    117

    Default

    Quote 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.

  10. #10
    Join Date
    Sep 2009
    Posts
    69

    Default

    Quote 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.

    Quote 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; 08-19-2014 at 04:37 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •