Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-24208

Use boost::none instead of boost::none_t()

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 3.2.6
    • Component/s: Internal Code
    • None
    • Platforms 15 (06/03/16)
    • None
    • 0
    • None
    • None
    • None
    • None
    • None
    • None

      MongoDB doesn't build with recent versions of boost (1.60 here), when using --use-system-boost because of changes in boost::optional. Indeed, boost::none_t is not default constructible anymore, so boost::none_t() doesn't compile anymore. See also: http://www.boost.org/doc/libs/release/boost/none.hpp

      There are several options to work around this issue:

      • use the boost::none constant
      • use the more verbose {boost::none_t(boost::none_t::init_tag())}
      • define {BOOST_OPTIONAL_USE_OLD_DEFINITION_OF_NONE}

        globally and continue using

        {boost::none_t()}
      find -type f -iname '*.[ch]*' -exec sed -e "s/boost::none_t()/boost::none/" -i {} \;
      

      seems to fix the issue.

            Assignee:
            andrew.morrow@mongodb.com Andrew Morrow (Inactive)
            Reporter:
            antoinep92 Antoine Poliakov
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: