jsoncpp icon indicating copy to clipboard operation
jsoncpp copied to clipboard

operator = works incorrect

Open kolobok55 opened this issue 9 years ago • 4 comments

int main(int argc, char* argv[])
{
	Json::Value src, dst;
	src["a"] = 1;
	src["t"] = "some txt";
        // Ok, we have { a:1, t:"some txt" }
	const Json::Value const_src = src; // Ok, we have copy of src
	dst = const_src;
        // Error: const_src == nullValue
}

Is it normal const Value changes by 'operator=' ? Why 'operator=' don't deep copy of const_src?

kolobok55 avatar Nov 29 '17 08:11 kolobok55

Related to #704?

cdunn2001 avatar Dec 03 '17 16:12 cdunn2001

Unable to reproduce at e6a588a2461f6c7cc7af37604363dd67757ccae1, everything works as expected.

okodron avatar Dec 04 '17 08:12 okodron

Ok. Please re-open if it recurs.

cdunn2001 avatar Dec 04 '17 20:12 cdunn2001

Should it be closed?

okodron avatar Jan 16 '18 08:01 okodron