Description
stream document misuse issue
file directory - ./controller/db_controller.h
compiler related error throwing stream related error
Error-log Below -
In file included from /Users/mac/code/cpp_env/idEngine_bsoncxx_and_mongocxx_integration/main.cpp:1:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.4.sdk/usr/include/c++/v1/iostream:43:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.4.sdk/usr/include/c++/v1/ios:222:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.4.sdk/usr/include/c++/v1/__locale:15:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.4.sdk/usr/include/c++/v1/__memory/shared_ptr.h:19:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.4.sdk/usr/include/c++/v1/__functional/reference_wrapper.h:14:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.4.sdk/usr/include/c++/v1/__functional/invoke.h:14:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.4.sdk/usr/include/c++/v1/__type_traits/invoke.h:20:
/Library/Developer/CommandLineTools/SDKs/MacOSX14.4.sdk/usr/include/c++/v1/__type_traits/is_base_of.h:22:94: error: incomplete type 'bsoncxx::v_noabi::builder::stream::value_context<bsoncxx::v_noabi::builder::stream::key_context<>>' used in type trait expression
struct _LIBCPP_TEMPLATE_VIS is_base_of : public integral_constant<bool, __is_base_of(_Bp, _Dp)> {};
^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.4.sdk/usr/include/c++/v1/__type_traits/conjunction.h:27:32: note: in instantiation of template class 'std::is_base_of<std::ios_base, bsoncxx::v_noabi::builder::stream::value_context<bsoncxx::v_noabi::builder::stream::key_context<>>>' requested here
__expand_to_true<__enable_if_t<_Pred::value>...> __and_helper(int);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.4.sdk/usr/include/c++/v1/__type_traits/conjunction.h:38:39: note: while substituting explicitly-specified template arguments into function template '__and_helper'
using _And _LIBCPP_NODEBUG = decltype(std::__and_helper<_Pred...>(0));
^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.4.sdk/usr/include/c++/v1/ostream:1078:5: note: in instantiation of template type alias '_And' requested here
_And<is_base_of<ios_base, _Stream>,
^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.4.sdk/usr/include/c++/v1/ostream:1082:11: note: in instantiation of default argument for 'operator<<<bsoncxx::v_noabi::builder::stream::value_context<bsoncxx::v_noabi::builder::stream::key_context<>>, int>' required here
_Stream&& operator<<(_Stream&& __os, const _Tp& __x)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/mac/code/cpp_env/vcpkg/installed/arm64-osx/include/bsoncxx/v_noabi/bsoncxx/builder/stream/value_context.hpp:119:76: note: while substituting deduced template arguments into function template 'operator<<' [with _Stream = bsoncxx::v_noabi::builder::stream::value_context<bsoncxx::v_noabi::builder::stream::key_context<>>, _Tp = int, $2 = (no value)]
std::is_same<value_context, decltype(std::declval<value_context>() << 1 << "str")>::value,
^
/Users/mac/code/cpp_env/idEngine_bsoncxx_and_mongocxx_integration/controller/db_controller.h:76:16: note: in instantiation of template class 'bsoncxx::v_noabi::builder::stream::value_context<bsoncxx::v_noabi::builder::stream::key_context<>>' requested here
update << "$set" << bsoncxx::builder::stream::open_document
^
/Users/mac/code/cpp_env/vcpkg/installed/arm64-osx/include/bsoncxx/v_noabi/bsoncxx/builder/stream/value_context.hpp:50:7: note: definition of 'bsoncxx::v_noabi::builder::stream::value_context<bsoncxx::v_noabi::builder::stream::key_context<>>' is not complete until the closing '}'
class value_context {
^
In file included from /Users/mac/code/cpp_env/idEngine_bsoncxx_and_mongocxx_integration/main.cpp:1:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.4.sdk/usr/include/c++/v1/iostream:43:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.4.sdk/usr/include/c++/v1/ios:222:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.4.sdk/usr/include/c++/v1/__locale:15:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.4.sdk/usr/include/c++/v1/__memory/shared_ptr.h:19:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.4.sdk/usr/include/c++/v1/__functional/reference_wrapper.h:14:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.4.sdk/usr/include/c++/v1/__functional/invoke.h:14:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.4.sdk/usr/include/c++/v1/__type_traits/invoke.h:20:
/Library/Developer/CommandLineTools/SDKs/MacOSX14.4.sdk/usr/include/c++/v1/__type_traits/is_base_of.h:22:94: error: incomplete type 'bsoncxx::v_noabi::builder::stream::value_context<bsoncxx::v_noabi::builder::stream::key_context<bsoncxx::v_noabi::builder::stream::key_context<>>>' used in type trait expression
struct _LIBCPP_TEMPLATE_VIS is_base_of : public integral_constant<bool, __is_base_of(_Bp, _Dp)> {};
^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.4.sdk/usr/include/c++/v1/__type_traits/conjunction.h:27:32: note: in instantiation of template class 'std::is_base_of<std::ios_base, bsoncxx::v_noabi::builder::stream::value_context<bsoncxx::v_noabi::builder::stream::key_context<bsoncxx::v_noabi::builder::stream::key_context<>>>>' requested here
__expand_to_true<__enable_if_t<_Pred::value>...> __and_helper(int);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.4.sdk/usr/include/c++/v1/__type_traits/conjunction.h:38:39: note: while substituting explicitly-specified template arguments into function template '__and_helper'
using _And _LIBCPP_NODEBUG = decltype(std::__and_helper<_Pred...>(0));
^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.4.sdk/usr/include/c++/v1/ostream:1078:5: note: in instantiation of template type alias '_And' requested here
_And<is_base_of<ios_base, _Stream>,
^
/Library/Developer/CommandLineTools/SDKs/MacOSX14.4.sdk/usr/include/c++/v1/ostream:1082:11: note: in instantiation of default argument for 'operator<<<bsoncxx::v_noabi::builder::stream::value_context<bsoncxx::v_noabi::builder::stream::key_context<bsoncxx::v_noabi::builder::stream::key_context<>>>, int>' required here
_Stream&& operator<<(_Stream&& __os, const _Tp& __x)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/mac/code/cpp_env/vcpkg/installed/arm64-osx/include/bsoncxx/v_noabi/bsoncxx/builder/stream/value_context.hpp:119:76: note: while substituting deduced template arguments into function template 'operator<<' [with _Stream = bsoncxx::v_noabi::builder::stream::value_context<bsoncxx::v_noabi::builder::stream::key_context<bsoncxx::v_noabi::builder::stream::key_context<>>>, _Tp = int, $2 = (no value)]
std::is_same<value_context, decltype(std::declval<value_context>() << 1 << "str")>::value,
^
/Users/mac/code/cpp_env/idEngine_bsoncxx_and_mongocxx_integration/controller/db_controller.h:77:16: note: in instantiation of template class 'bsoncxx::v_noabi::builder::stream::value_context<bsoncxx::v_noabi::builder::stream::key_context<bsoncxx::v_noabi::builder::stream::key_context<>>>' requested here
<< "current_user_n" << bsoncxx::types::b_int64{static_cast<int64_t>(persist.current_user_n)}
^
/Users/mac/code/cpp_env/vcpkg/installed/arm64-osx/include/bsoncxx/v_noabi/bsoncxx/builder/stream/value_context.hpp:50:7: note: definition of 'bsoncxx::v_noabi::builder::stream::value_context<bsoncxx::v_noabi::builder::stream::key_context<bsoncxx::v_noabi::builder::stream::key_context<>>>' is not complete until the closing '}'
class value_context {
^
2 errors generated.