rstudio/rstudio — comment on commit 75213db114504468d19381dc9e5d7e2dfa73b15b
File: src/cpp/session/modules/SessionSourceControl.cpp line 559
By jcheng5:

boost::optional does define an * operator (and has since at least boost 1.42) and it's the same as get(). We get the same warning in vcsListBranches and that time we use get(), not *.

The warning message has to do with strict aliasing rules, apparently boost::optional violates them. See this post, especially towards the end:
http://lists.boost.org/Archives/boost/2009/05/151318.php

I think our choices are to eliminate usage of boost::optional, or to turn off strict aliasing. If we do the former then I think we should try to make sure that we receive the strict aliasing warnings on at least our commonly used platforms (Mac and Ubuntu 11.10?).

It is really a shame because boost::optional is such a nice facility to have; I love the self-documenting nature of it, versus magic values or pointers...