-
Type: Bug
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: 3.0.0
-
Component/s: None
-
None
I am using
Apple LLVM version 7.0.2 (clang-700.1.81)
Target: x86_64-apple-darwin15.3.0
Thread model: posix
The compilation fails with
[ 3%] Built target EP_mnmlstc_core
[ 4%] Building CXX object src/bsoncxx/CMakeFiles/bsoncxx.dir/exception/error_code.cpp.o
/Path/to/mongo-cxx-driver-r3.0.0/src/bsoncxx/exception/error_code.cpp:30:17: error: implicit instantiation of undefined template 'std::_1::basic_string<char, std::1::char_traits<char>, std::_1::allocator<char> >'
std::string message(int condition) const noexcept override {
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iosfwd:193:33: note: template is declared here
class _LIBCPP_TYPE_VIS_ONLY basic_string;
^
/Path/to/mongo-cxx-driver-r3.0.0/src/bsoncxx/exception/error_code.cpp:33:24: error: implicit instantiation of undefined template 'std::_1::basic_string<char, std::1::char_traits<char>, std::_1::allocator<char> >'
return "tried to append new key while in subarray";
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iosfwd:193:33: note: template is declared here
class _LIBCPP_TYPE_VIS_ONLY basic_string;
^
/Path/to/mongo-cxx-driver-r3.0.0/src/bsoncxx/exception/error_code.cpp:35:24: error: implicit instantiation of undefined template 'std::_1::basic_string<char, std::1::char_traits<char>, std::_1::allocator<char> >'
return "tried to close array while in subdocument";
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iosfwd:193:33: note: template is declared here
class _LIBCPP_TYPE_VIS_ONLY basic_string;
^
/Path/to/mongo-cxx-driver-r3.0.0/src/bsoncxx/exception/error_code.cpp:37:24: error: implicit instantiation of undefined template 'std::_1::basic_string<char, std::1::char_traits<char>, std::_1::allocator<char> >'
return "tried to close document while in a subarray";
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iosfwd:193:33: note: template is declared here
class _LIBCPP_TYPE_VIS_ONLY basic_string;
^
/Path/to/mongo-cxx-driver-r3.0.0/src/bsoncxx/exception/error_code.cpp:39:24: error: implicit instantiation of undefined template 'std::_1::basic_string<char, std::1::char_traits<char>, std::_1::allocator<char> >'
return "tried to operate on document, but this is an array";
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iosfwd:193:33: note: template is declared here
class _LIBCPP_TYPE_VIS_ONLY basic_string;
^
/Path/to/mongo-cxx-driver-r3.0.0/src/bsoncxx/exception/error_code.cpp:41:24: error: implicit instantiation of undefined template 'std::_1::basic_string<char, std::1::char_traits<char>, std::_1::allocator<char> >'
return "tried to operate on array, but this is a document";
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iosfwd:193:33: note: template is declared here
class _LIBCPP_TYPE_VIS_ONLY basic_string;
^
In file included from /Path/to/mongo-cxx-driver-r3.0.0/src/bsoncxx/exception/error_code.cpp:45:
/Path/to/mongo-cxx-driver-r3.0.0/src/bsoncxx/enums/type.hpp:19:1: error: implicit instantiation of undefined template 'std::_1::basic_string<char, std::1::char_traits<char>, std::_1::allocator<char> >'
BSONCXX_ENUM(double, 0x01)
^
/Path/to/mongo-cxx-driver-r3.0.0/src/bsoncxx/exception/error_code.cpp:44:16: note: expanded from macro 'BSONCXX_ENUM'
return
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iosfwd:193:33: note: template is declared here
class _LIBCPP_TYPE_VIS_ONLY basic_string;
^
In file included from /Path/to/mongo-cxx-driver-r3.0.0/src/bsoncxx/exception/error_code.cpp:45:
/Path/to/mongo-cxx-driver-r3.0.0/src/bsoncxx/enums/type.hpp:20:1: error: implicit instantiation of undefined template 'std::_1::basic_string<char, std::1::char_traits<char>, std::_1::allocator<char> >'
BSONCXX_ENUM(utf8, 0x02)
^
/Path/to/mongo-cxx-driver-r3.0.0/src/bsoncxx/exception/error_code.cpp:44:16: note: expanded from macro 'BSONCXX_ENUM'
return {"expected element type k_" #name}
;
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iosfwd:193:33: note: template is declared here
class _LIBCPP_TYPE_VIS_ONLY basic_string;
^
In file included from /Path/to/mongo-cxx-driver-r3.0.0/src/bsoncxx/exception/error_code.cpp:45:
/Path/to/mongo-cxx-driver-r3.0.0/src/bsoncxx/enums/type.hpp:21:1: error: implicit instantiation of undefined template 'std::_1::basic_string<char, std::1::char_traits<char>, std::_1::allocator<char> >'
BSONCXX_ENUM(document, 0x03)
^
/Path/to/mongo-cxx-driver-r3.0.0/src/bsoncxx/exception/error_code.cpp:44:16: note: expanded from macro 'BSONCXX_ENUM'
return
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iosfwd:193:33: note: template is declared here
class _LIBCPP_TYPE_VIS_ONLY basic_string;
^
In file included from /Path/to/mongo-cxx-driver-r3.0.0/src/bsoncxx/exception/error_code.cpp:45:
/Path/to/mongo-cxx-driver-r3.0.0/src/bsoncxx/enums/type.hpp:22:1: error: implicit instantiation of undefined template 'std::_1::basic_string<char, std::1::char_traits<char>, std::_1::allocator<char> >'
BSONCXX_ENUM(array, 0x04)
^
/Path/to/mongo-cxx-driver-r3.0.0/src/bsoncxx/exception/error_code.cpp:44:16: note: expanded from macro 'BSONCXX_ENUM'
return {"expected element type k_" #name}
;
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iosfwd:193:33: note: template is declared here
class _LIBCPP_TYPE_VIS_ONLY basic_string;
^
In file included from /Path/to/mongo-cxx-driver-r3.0.0/src/bsoncxx/exception/error_code.cpp:45:
/Path/to/mongo-cxx-driver-r3.0.0/src/bsoncxx/enums/type.hpp:23:1: error: implicit instantiation of undefined template 'std::_1::basic_string<char, std::1::char_traits<char>, std::_1::allocator<char> >'
BSONCXX_ENUM(binary, 0x05)
^
/Path/to/mongo-cxx-driver-r3.0.0/src/bsoncxx/exception/error_code.cpp:44:16: note: expanded from macro 'BSONCXX_ENUM'
return
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iosfwd:193:33: note: template is declared here
class _LIBCPP_TYPE_VIS_ONLY basic_string;
^
In file included from /Path/to/mongo-cxx-driver-r3.0.0/src/bsoncxx/exception/error_code.cpp:45:
/Path/to/mongo-cxx-driver-r3.0.0/src/bsoncxx/enums/type.hpp:24:1: error: implicit instantiation of undefined template 'std::_1::basic_string<char, std::1::char_traits<char>, std::_1::allocator<char> >'
BSONCXX_ENUM(undefined, 0x06)
^
/Path/to/mongo-cxx-driver-r3.0.0/src/bsoncxx/exception/error_code.cpp:44:16: note: expanded from macro 'BSONCXX_ENUM'
return {"expected element type k_" #name}
;
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iosfwd:193:33: note: template is declared here
class _LIBCPP_TYPE_VIS_ONLY basic_string;
^
In file included from /Path/to/mongo-cxx-driver-r3.0.0/src/bsoncxx/exception/error_code.cpp:45:
/Path/to/mongo-cxx-driver-r3.0.0/src/bsoncxx/enums/type.hpp:25:1: error: implicit instantiation of undefined template 'std::_1::basic_string<char, std::1::char_traits<char>, std::_1::allocator<char> >'
BSONCXX_ENUM(oid, 0x07)
^
/Path/to/mongo-cxx-driver-r3.0.0/src/bsoncxx/exception/error_code.cpp:44:16: note: expanded from macro 'BSONCXX_ENUM'
return
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iosfwd:193:33: note: template is declared here
class _LIBCPP_TYPE_VIS_ONLY basic_string;
^
In file included from /Path/to/mongo-cxx-driver-r3.0.0/src/bsoncxx/exception/error_code.cpp:45:
/Path/to/mongo-cxx-driver-r3.0.0/src/bsoncxx/enums/type.hpp:26:1: error: implicit instantiation of undefined template 'std::_1::basic_string<char, std::1::char_traits<char>, std::_1::allocator<char> >'
BSONCXX_ENUM(bool, 0x08)
^
/Path/to/mongo-cxx-driver-r3.0.0/src/bsoncxx/exception/error_code.cpp:44:16: note: expanded from macro 'BSONCXX_ENUM'
return {"expected element type k_" #name}
;
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iosfwd:193:33: note: template is declared here
class _LIBCPP_TYPE_VIS_ONLY basic_string;
^
In file included from /Path/to/mongo-cxx-driver-r3.0.0/src/bsoncxx/exception/error_code.cpp:45:
/Path/to/mongo-cxx-driver-r3.0.0/src/bsoncxx/enums/type.hpp:27:1: error: implicit instantiation of undefined template 'std::_1::basic_string<char, std::1::char_traits<char>, std::_1::allocator<char> >'
BSONCXX_ENUM(date, 0x09)
^
/Path/to/mongo-cxx-driver-r3.0.0/src/bsoncxx/exception/error_code.cpp:44:16: note: expanded from macro 'BSONCXX_ENUM'
return
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iosfwd:193:33: note: template is declared here
class _LIBCPP_TYPE_VIS_ONLY basic_string;
^
In file included from /Path/to/mongo-cxx-driver-r3.0.0/src/bsoncxx/exception/error_code.cpp:45:
/Path/to/mongo-cxx-driver-r3.0.0/src/bsoncxx/enums/type.hpp:28:1: error: implicit instantiation of undefined template 'std::_1::basic_string<char, std::1::char_traits<char>, std::_1::allocator<char> >'
BSONCXX_ENUM(null, 0x0A)
^
/Path/to/mongo-cxx-driver-r3.0.0/src/bsoncxx/exception/error_code.cpp:44:16: note: expanded from macro 'BSONCXX_ENUM'
return {"expected element type k_" #name}
;
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iosfwd:193:33: note: template is declared here
class _LIBCPP_TYPE_VIS_ONLY basic_string;
^
In file included from /Path/to/mongo-cxx-driver-r3.0.0/src/bsoncxx/exception/error_code.cpp:45:
/Path/to/mongo-cxx-driver-r3.0.0/src/bsoncxx/enums/type.hpp:29:1: error: implicit instantiation of undefined template 'std::_1::basic_string<char, std::1::char_traits<char>, std::_1::allocator<char> >'
BSONCXX_ENUM(regex, 0x0B)
^
/Path/to/mongo-cxx-driver-r3.0.0/src/bsoncxx/exception/error_code.cpp:44:16: note: expanded from macro 'BSONCXX_ENUM'
return
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iosfwd:193:33: note: template is declared here
class _LIBCPP_TYPE_VIS_ONLY basic_string;
^
In file included from /Path/to/mongo-cxx-driver-r3.0.0/src/bsoncxx/exception/error_code.cpp:45:
/Path/to/mongo-cxx-driver-r3.0.0/src/bsoncxx/enums/type.hpp:30:1: error: implicit instantiation of undefined template 'std::_1::basic_string<char, std::1::char_traits<char>, std::_1::allocator<char> >'
BSONCXX_ENUM(dbpointer, 0x0C)
^
/Path/to/mongo-cxx-driver-r3.0.0/src/bsoncxx/exception/error_code.cpp:44:16: note: expanded from macro 'BSONCXX_ENUM'
return {"expected element type k_" #name}
;
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iosfwd:193:33: note: template is declared here
class _LIBCPP_TYPE_VIS_ONLY basic_string;
^
In file included from /Path/to/mongo-cxx-driver-r3.0.0/src/bsoncxx/exception/error_code.cpp:45:
/Path/to/mongo-cxx-driver-r3.0.0/src/bsoncxx/enums/type.hpp:31:1: error: implicit instantiation of undefined template 'std::_1::basic_string<char, std::1::char_traits<char>, std::_1::allocator<char> >'
BSONCXX_ENUM(code, 0x0D)
^
/Path/to/mongo-cxx-driver-r3.0.0/src/bsoncxx/exception/error_code.cpp:44:16: note: expanded from macro 'BSONCXX_ENUM'
return
;
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iosfwd:193:33: note: template is declared here
class _LIBCPP_TYPE_VIS_ONLY basic_string;
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[2]: *** [src/bsoncxx/CMakeFiles/bsoncxx.dir/exception/error_code.cpp.o] Error 1
make[1]: *** [src/bsoncxx/CMakeFiles/bsoncxx.dir/all] Error 2
make: *** [all] Error 2
- duplicates
-
CXX-836 Missing #include <string> in mongo-cxx-driver
- Closed