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

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

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Icon: Minor - P4 Minor - P4
    • None
    • 3.2.6
    • Internal Code
    • None
    • Platforms 15 (06/03/16)

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: