Bug 78423 - [c+11] error: use of deleted function 'std::basic_ostringstream
Summary: [c+11] error: use of deleted function 'std::basic_ostringstream
Status: RESOLVED DUPLICATE of bug 54316
Alias: None
Product: gcc
Classification: Unclassified
Component: libstdc++ (show other bugs)
Version: 4.9.3
: P3 normal
Target Milestone: 5.0
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-11-18 19:20 UTC by Bharath
Modified: 2016-11-18 19:25 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bharath 2016-11-18 19:20:37 UTC
Hi 

I am getting below error when I tries to build with gcc-4.9.

-I../../../../common/inc/qstream -I../../../../../dependencies/mcpp/src  ../../src//sectionAdapter.cpp -o ../../src//sectionAdapter.o
../../src//GLAdapter.cpp: In member function 'virtual void SDP::sectionAdapter::Process_sectionShaderSource(ObjectId32, int32_t, Data::PointerData*, Data::PointerData*)':
../../src//sectionAdapter.cpp:1224:28: error: use of deleted function 'std::basic_ostringstream<char>& std::basic_ostringstream<char>::operator=(const std::basic_ostringstream<char>&)'
             s_preprocessed = std::ostringstream();
                            ^
In file included from ../../src//sectionAdapter.h:14:0,
 
As per discussion in the below link this issue got fixed in GCC 5.

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54316

Due to project constraints we are not supposed to upgrade our gcc to version 5 & above.Can you please guide is there any other way we can fix above errors without upgrading our gcc version.

Kindly let me know if you need any more information.

Regards
Bharath
Comment 1 Andrew Pinski 2016-11-18 19:23:29 UTC
GCC 4.9.x is no longer maintained sorry.  We maintain a release for ~2 years.

>Can you please guide is there any other way we can fix above errors without upgrading our gcc version.

You could try to backport the referenced patch to GCC 4.9.x and go from there.

*** This bug has been marked as a duplicate of bug 54316 ***
Comment 2 Jonathan Wakely 2016-11-18 19:25:55 UTC
(In reply to Bharath from comment #0)
> Due to project constraints we are not supposed to upgrade our gcc to version
> 5 & above.Can you please guide is there any other way we can fix above
> errors without upgrading our gcc version.

Change your code so it doesn't use features that aren't supported by your toolchain.