I searched abound on JIRA and RootTalk about this issue, and mostly people talk about how the std:: issues will be fixed in ROOT6. Well we have ROOT6 now and this still happens:
root  int next = 5; ROOT_prompt_0:1:5: error: redefinition of 'next' as different kind of symbol int next = 5; ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iterator:509:1: note: previous definition is here next(_ForwardIter __x, ^
The std:: namespace is getting more and more filled with names. The utility of not having to type std:: for common functions can easily be reproduced with suitable using directives in a rootlogon.C script. Is there a way to disable the inclusion of namespace std & several headers at the cling prompt? I’d much rather manually include and use std::vector, std::cout and friends if it means I can expect well-formed C++ statements to work in ROOT.
Here are some other fun variable names that are banned in ROOT, even without any headers included by the user: next, begin, end, distance, ignore, array, count, map, vector, copy, fill, sort, set, list, hash, string. At the very least, could ROOT users be provided with a list of these banned names so we don’t accidentally use them?