[DOCS-8025] Comment on: "primer/insert.txt" Created: 04/Jun/16  Updated: 03/Nov/17  Resolved: 27/Jul/16

Status: Closed
Project: Documentation
Component/s: None
Affects Version/s: None
Fix Version/s: 01112017-cleanup

Type: Bug Priority: Major - P3
Reporter: Docs Collector User (Inactive) Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: collector-298ba4e7
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

ubuntu 16.04 x86_64, mongocxxdriver master branch.

Location: https://docs.mongodb.com/getting-started/cpp/insert/
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36
Referrer: https://docs.mongodb.com/getting-started/cpp/client/
Screen Resolution: 1920 x 1080


Participants:
Days since reply: 7 years, 29 weeks ago

 Description   

Problem with:

bsoncxx::document::value restaurant_doc =
document{} << "address" << open_document << "street" ....

Compiler reports error:

test1.cpp:46:30: error: conversion from ‘std::enable_if<true, bsoncxx::v_noabi::document::value>::type

{aka bsoncxx::v_noabi::document::value}

’ to non-scalar type ‘bsoncxx::v_noabi::builder::stream::document’ requested
<< "41704620" << finalize;

Fixed by not doing the initial assignment. E.g not mentioning document{}.

bsoncxx::document::value restaurant_doc{};
restaurant_doc << "address" << ...



 Comments   
Comment by Kay Kim (Inactive) [ 27/Jul/16 ]

Jira housekeeping as we are undergoing projects for driver documentation. If you require additional support, please open a new ticket for prioritization. Regards, Kay Kim

Comment by bratner bratner [ 04/Jun/16 ]

Not cool. Please remove name and e-mail from the report above.

Generated at Thu Feb 08 07:55:29 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.