Announcement

Collapse
No announcement yet.

Mir Now Depends Upon C++14

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

  • Mir Now Depends Upon C++14

    Phoronix: Mir Now Depends Upon C++14

    While many open-source projects are still transitioning over to a C++11 code-base, Ubuntu's Mir display server is already moving onto C++14...

    http://www.phoronix.com/scan.php?pag...us-Plus-14-Etc

  • #2
    Wow. make_unique is trivial to put into your codebase without requiring C++14, see Herb Sutter's blog.

    Comment


    • #3
      It absolutely is. My current work project builds with -std=c++11, because the default compilers of the current ubuntu LTS releases don't support c++14 yet, but we use make_unique. (That's right, on a current ubuntu LTS, you cannot build Mir any more )

      The post you mentioned is here: http://herbsutter.com/gotw/_102/
      The source is as simple as
      Code:
      template<typename T, typename ...Args>
      std::unique_ptr<T> make_unique( Args&& ...args )
      {
          return std::unique_ptr<T>( new T( std::forward<Args>(args)... ) );
      }
      You can even #ifdef __cplusplus <= 201402L the implementation to ensure that the compiler's implementation is preferred when possible.

      Comment


      • #4
        Originally posted by fabdiznec View Post
        Wow. make_unique is trivial to put into your codebase without requiring C++14, see Herb Sutter's blog.
        any modern compiler supports C++14, I see no harm in this as it enforces that the codebase is built with better compilers.

        Last I checked, Mir wasn't targetting any Microsoft platforms.

        Comment


        • #5
          hm

          Originally posted by rohcQaH View Post
          It absolutely is. My current work project builds with -std=c++11, because the default compilers of the current ubuntu LTS releases don't support c++14 yet, but we use make_unique. (That's right, on a current ubuntu LTS, you cannot build Mir any more )

          The post you mentioned is here: http://herbsutter.com/gotw/_102/
          The source is as simple as
          Code:
          template<typename T, typename ...Args>
          std::unique_ptr<T> make_unique( Args&& ...args )
          {
              return std::unique_ptr<T>( new T( std::forward<Args>(args)... ) );
          }
          You can even #ifdef __cplusplus <= 201402L the implementation to ensure that the compiler's implementation is preferred when possible.
          https://launchpad.net/~ubuntu-toolch...ve/ubuntu/test

          Comment


          • #6
            GNU C++ requires linking to the same version or newer of libstdc++. Which means that if you build software with a newer compiler, you require all of your users to install a newer libstdc++ too. This is annoying.

            Comment


            • #7
              Originally posted by Zan Lynx View Post
              GNU C++ requires linking to the same version or newer of libstdc++. Which means that if you build software with a newer compiler, you require all of your users to install a newer libstdc++ too. This is annoying.
              -static-libstdc++ is your friend.

              Comment


              • #8
                Originally posted by Joe1 View Post
                -static-libstdc++ is your friend.
                Users totally appreciate the 600kb binary size increase.

                Comment


                • #9
                  Originally posted by curaga View Post
                  Users totally appreciate the 600kb binary size increase.
                  do you have any tips for setting up mir on an amiga?

                  Comment


                  • #10
                    Originally posted by curaga View Post
                    Users totally appreciate the 600kb binary size increase.
                    really people still care about anything less then 1MB of space?
                    I could trow away 100GB right now and still have more then 1TB of free space -.-

                    Comment

                    Working...
                    X