MySQL++

Artifact [777f035572]
Login

Artifact 777f03557222dad24f7620d97c49ba6f9eac74ccb29e477e65867154ff9035a8:

Ticket change [777f035572] - Ticket [97f62ef016ea3d71|97f62ef016] <i>Convert auto_ptr in lib/refcounted.h to unique_ptr</i> status still Open with 3 other changes by anonymous 2018-05-02 15:38:33.
D 2018-05-02T15:38:33.744
J icomment Here\sis\sa\sproposed\spatch\sto\sadd\sstd::unique_ptr\ssupport:\r\n\r\ndiff\s--git\sa/mysql++-3.2.3/lib/dbdriver.cpp\sb/mysql++-3.2.3/lib/dbdriver.cpp\r\nindex\s8d43d1a..73287c6\s100644\r\n---\sa/mysql++-3.2.3/lib/dbdriver.cpp\r\n+++\sb/mysql++-3.2.3/lib/dbdriver.cpp\r\n@@\s-300,7\s+300,11\s@@\sbool\r\n\sDBDriver::set_option_impl(Option*\so)\r\n\s{\r\n\s\s\s\s\s\s\s\sstd::ostringstream\sos;\r\n+#if\s__cplusplus\s>=\s201103L\r\n+\s\s\s\s\s\s\sstd::unique_ptr<Option>\scleanup(o);\r\n+#else\r\n\s\s\s\s\s\s\s\sstd::auto_ptr<Option>\scleanup(o);\r\n+#endif\r\n\s\r\n\s\s\s\s\s\s\s\sswitch\s(o->set(this))\s{\r\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\scase\sOption::err_NONE:\r\ndiff\s--git\sa/mysql++-3.2.3/lib/refcounted.h\sb/mysql++-3.2.3/lib/refcounted.h\r\nindex\s0869682..d985e1d\s100644\r\n---\sa/mysql++-3.2.3/lib/refcounted.h\r\n+++\sb/mysql++-3.2.3/lib/refcounted.h\r\n@@\s-101,7\s+101,11\s@@\spublic:\r\n\s\s\s\s\s\s\s\scounted_(c),\r\n\s\s\s\s\s\s\s\srefs_(0)\r\n\s\s\s\s\s\s\s\s{\r\n+#if\s__cplusplus\s>=\s201103L\r\n+\s\s\s\s\s\s\s\s\s\s\s\s\s\s\sstd::unique_ptr<T>\sexception_guard(counted_);\r\n+#else\r\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\sstd::auto_ptr<T>\sexception_guard(counted_);\r\n+#endif\r\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\sif\s(counted_)\s{\r\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\srefs_\s=\snew\ssize_t(1);\r\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s}
J login anonymous
J mimetype text/x-fossil-plain
K 97f62ef016ea3d71fffb3a110400b9b2477aff15
U anonymous
Z 731a486bbf6fdf1bd6ae8407fc3fa098