Announcement

Collapse
No announcement yet.

Mir Now Depends Upon C++14

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

  • Joe1
    replied
    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.

    Leave a comment:


  • Zan Lynx
    replied
    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.

    Leave a comment:


  • rikkinho
    replied
    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.

    Leave a comment:


  • peppercats
    replied
    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.

    Leave a comment:


  • rohcQaH
    replied
    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.

    Leave a comment:


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

    Leave a comment:


  • phoronix
    started a topic Mir Now Depends Upon C++14

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

    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
Working...
X