Uploaded image for project: 'C++ Driver'
  1. C++ Driver
  2. CXX-951

"'ref' is not a member of 'boost'" error when compiling legacy driver in C++11 mode

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • legacy-1.1.3
    • Affects Version/s: None
    • Component/s: None
    • Labels:

      This is a regression introduced in legacy 1.1.2 by d861b31.

      The error reads as follows:

       [2016/06/21 18:23:13.340] src/mongo/client/examples/connect.cpp: In function 'int main(int, char**)':
       [2016/06/21 18:23:13.340] src/mongo/client/examples/connect.cpp:73:49: error: 'ref' is not a member of 'boost'
       [2016/06/21 18:23:13.340]          mongo::stdx::bind(&makeOstreamAppender, boost::ref(std::cout));
       [2016/06/21 18:23:13.340]                                                  ^
       [2016/06/21 18:23:13.340] src/mongo/client/examples/connect.cpp:73:49: note: suggested alternative:
       [2016/06/21 18:23:13.340] In file included from /usr/include/c++/4.8/memory:79:0,
       [2016/06/21 18:23:13.340]                  from /usr/include/boost/config/no_tr1/memory.hpp:21,
       [2016/06/21 18:23:13.340]                  from /usr/include/boost/smart_ptr/shared_ptr.hpp:27,
       [2016/06/21 18:23:13.340]                  from /usr/include/boost/shared_ptr.hpp:17,
       [2016/06/21 18:23:13.340]                  from src/mongo/client/dbclient_rs.h:20,
       [2016/06/21 18:23:13.340]                  from src/mongo/client/dbclient.h:59,
       [2016/06/21 18:23:13.340]                  from src/mongo/client/examples/connect.cpp:29:
       [2016/06/21 18:23:13.340] /usr/include/c++/4.8/functional:493:5: note:   'std::ref'
       [2016/06/21 18:23:13.340]      ref(reference_wrapper<_Tp> __t) noexcept
       [2016/06/21 18:23:13.340]      ^
       [2016/06/21 18:23:13.644] scons: *** [build/linux2/64/c++11_on/ssl/mongo/client/examples/connect.o] Error 1
       [2016/06/21 18:23:14.365] scons: building terminated because of errors.
      

            Assignee:
            rassi J Rassi
            Reporter:
            rassi J Rassi
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: