Closed guoxiao closed 8 years ago
@guoxiao, it seems like the build failed: "CppUnitTestRunnerLocal.cc:158:5: error: ‘unique_ptr’ does not name a type CppUnitTestRunnerLocal.cc:160:5: error: ‘unique_ptr’ does not name a type CppUnitTestRunnerLocal.cc: In constructor ‘ComboOutputter::ComboOutputter(CppUnit::TestResultCollector*, const string&)’:"
Does unique_ptr only exist on a newer c++ standard?
Unique_ptr is from newish c++11. Not all of the internal stack has upgraded to this newer version.
From: Allen Reese [mailto:notifications@github.com]
Sent: Monday, 18 April, 2016 10:20
To: yahoo/mdbm mdbm@noreply.github.com
Subject: Re: [yahoo/mdbm] Fix error: ‘template
@guoxiao https://github.com/guoxiao , it seems like the build failed: "CppUnitTestRunnerLocal.cc:158:5: error: ‘unique_ptr’ does not name a type CppUnitTestRunnerLocal.cc:160:5: error: ‘unique_ptr’ does not name a type CppUnitTestRunnerLocal.cc: In constructor ‘ComboOutputter::ComboOutputter(CppUnit::TestResultCollector*, const string&)’:"
Does unique_ptr only exist on a newer c++ standard?
— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/yahoo/mdbm/pull/61#issuecomment-211483348 https://github.com/notifications/beacon/AHJP7D3q9eo4gfDHQOSNlttiQLDdz8Szks5p471CgaJpZM4IJAmf.gif
Since the default build options include -Werror
, the build will fail with newer compiler.
I think I should add some check and use auto_ptr
and unique_ptr
for old and new compiler separately.
@steve-carney I'm more worried about failing on new compilers than doing internal fixups.
Is there an ifdef we can use to pick if it should be auto_ptr or unique_ptr?
duh. Nevermind that:
"
+#include
+#endif "
That works for me.
Thanks @guoxiao, I think this is good.
use
unique_ptr
instead