Like Tree4Likes

Beginner!

This is a discussion on Beginner! within the C++ Programming forums, part of the General Programming Boards category; Also not all Linux distributions upgrade gcc within weeks of a new update. These distributions favor stability over cutting edge, ...

  1. #16
    Registered User
    Join Date
    May 2010
    Posts
    2,917
    Also not all Linux distributions upgrade gcc within weeks of a new update. These distributions favor stability over cutting edge, and since gcc is very integrated into the system they only upgrade the compiler when updating their distribution. And downloading and compiling gcc is not always an easy task.

    Jim

  2. #17
    Registered User manasij7479's Avatar
    Join Date
    Feb 2011
    Location
    Kolkata@India
    Posts
    2,523
    Quote Originally Posted by jimblumberg View Post
    And downloading and compiling gcc is not always an easy task.
    Agreed, but you almost never have to build it on your own.
    Even Ubuntu, which almost always has outdated packages, has a ppa for this, which upgrades the whole toolchain.
    https://launchpad.net/~ubuntu-toolchain-r/+archive/test
    Manasij Mukherjee | gcc-4.9.2 @Arch Linux
    Slow and Steady wins the race... if and only if :
    1.None of the other participants are fast and steady.
    2.The fast and unsteady suddenly falls asleep while running !



  3. #18
    Registered User
    Join Date
    May 2010
    Posts
    2,917
    Agreed, but you almost never have to build it on your own.
    I disagree, if you want the latest on some of these distributions you need to download and compile it yourself.

    Jim

  4. #19
    Registered User manasij7479's Avatar
    Join Date
    Feb 2011
    Location
    Kolkata@India
    Posts
    2,523
    Quote Originally Posted by jimblumberg View Post
    if you want the latest on some of these distributions you need to download and compile it yourself.
    Can you give an example of such a distro, which a beginner is likely to use ?
    I've found that official backports are generally made available when new major versions are released.(Debian, OpenSuse, Ubuntu etc)
    Manasij Mukherjee | gcc-4.9.2 @Arch Linux
    Slow and Steady wins the race... if and only if :
    1.None of the other participants are fast and steady.
    2.The fast and unsteady suddenly falls asleep while running !



  5. #20
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    4,407
    And downloading and compiling gcc is not always an easy task.
    I'm not sure it is ever easy to build from mains.

    Building from a package provided by a particular distribution is pretty easy, but because this is about staying at the front of C++11 support you'll actually have to build from the latest snapshot and even do some patching from the mailing list. (The "default" and "deleted" feature hit the mailing list ages before it was added to the repository.)



    No, I don't. I push standard C++ features and non-standard features out of concern for security.
    I'm not saying that you do it with intent. You don't know those unfortunate bits because they rarely result in any problems for you. You work in your mostly stable environment so you don't need to learn those things. When they come up, you look for a solution anew.

    Let's leave this for another time and revisit the relevant post.

    It's true that I usually (or quite as often) do not recommend standard C++ features not present in Visual Studio, but that's twofold: because I am somewhat unfamiliar with them and because they're not so widespread.
    So, to be clear, you don't recommend C++ features that are missing from "Visual C++" because "I'm unfamiliar with that feature." and "That feature isn't widespread."

    That my lad, or lass, is the problem. Your view of a features "widespread" availability and "familiar" semantics doesn't line up with reality.

    The standard says a lot, but until more compilers provide C++11 features we can only guess at what "widespread" and "familiar" might mean.

    I don't want to harp on exported templates but they are a perfect example for how a standard feature doesn't see a widely available implementation. Look at how many features were killed during review. Even though the standard is set some features will never see wide availability.

    Another feature with an unfortunate reality is template friend classes from template parameters. The standard is direct. The feature is widely available. It isn't a familiar feature: almost every compiler needs a different hack. What hacks will `nullptr' need when some vendor decides to do things differently?

    It isn't your job to answer for these things; you avoid all of this stuff by simply telling people that a feature is new to C++11.

    Which begs the questions, why aren't you telling people upfront that your "alternative" suggestions utilize a new feature?

    You keep saying that "I want to advance the cause of C++11." in some fashion. That's a noble goal, but it doesn't do anything to address my criticism of your behavior. You can lead the call to use C++11 features while still noting that they are C++11 features.

    Soma
    Elkvis and whiteflags like this.

  6. #21
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Posts
    23,010
    So, if all I do is change my lines to,
    "If you have a C++11 compatible compiler, you may try changing 'NULL' to 'nullptr'."
    Is that enough to satisfy your complain, or should I add extra information, such as
    "If your compiler supports nullptr, you should it instead of NULL (GCC 4.6+, VS10+). If you are using an older version of the compiler, consider upgrading."
    ?
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  7. #22
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    4,407
    Follow the example set by laserlight: simply note that the feature may not be available or portable because it is new to C++11.

    Soma

Page 2 of 2 FirstFirst 12
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. anyone can help?beginner nd help...
    By silent in forum C++ Programming
    Replies: 6
    Last Post: 10-01-2010, 10:20 AM
  2. Windows programming for beginner (Absolute beginner)
    By WDT in forum Windows Programming
    Replies: 4
    Last Post: 01-06-2004, 11:21 AM
  3. Beginner's help
    By rekiller in forum Game Programming
    Replies: 3
    Last Post: 03-17-2003, 08:06 AM
  4. beginner ?
    By braincrash in forum C Programming
    Replies: 2
    Last Post: 02-18-2003, 03:33 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21