This pull request enables the C++11 support. There is an issue with GTEST when using EXPECT, ASSERT, QVERIFY, and we pass a shared pointer as an argument. The boost::shared_ptr bool operator is explicit and the compiler does not make an implicit conversion for us when we're using these GTEST macros.
I would say that the cleanest solution would be to use the bool operator in the form of a static_cast<bool>(mysharedPtr) or bool(mysharedPtr). However we have lots of lines where we are comparing the shared pointer with NULL. So, for consistency this is the way I chose here to fix the problem.
There are other ways as redeclaring ASSERT_TRUE with a different name and wrap it with a new ASSERT_TRUE but I don't think it's worth it.
Node::ProcessPublishers() is using an iterator to loop through all the publishers for calling SendMessage(). The loop was protected with Node::publisherDeleteMutex but not with Node::publisherMutex. If other thread adds a new publisher to this->publishers (for example executing Node::Advertise()) can cause a new internal allocation in the std::vector Node::publishers and invalidate the iterator in the for loop.
/Users/jenkins/workspace/gazebo-any-devel-homebrew-amd64/gazebo/tools/gz_TEST.cc:305:5: error: no matching conversion for functional-style cast from 'std::ifstream' (aka 'basic_ifstream<char>') to '::testing::AssertionResult'
/Users/jenkins/workspace/gazebo-any-devel-homebrew-amd64/gazebo/tools/gz_TEST.cc:330:5: error: no matching conversion for functional-style cast from 'std::ifstream' (aka 'basic_ifstream<char>') to '::testing::AssertionResult'
Something to note, just as we won't be supporting gazebo5 on precise due to an old default gcc, we will also have problems with Mac OSX 10.8 since it uses libstdc++ by default, while c++11 requires libc++. We should support OSX 10.9+ for gazebo5.
We could replace all boost::shared_ptr by std::shared_ptr and that could work, yes.
But, in that case we will be probably ignoring the concept of ownership, present in std::unique_ptr and std::shared_ptr. I can bet 5 eurocents that we have a good bunch of boost::shared_ptr that could be converted into unique_ptr.