using C++17 emplace return type

This commit is contained in:
Jinhao
2018-08-27 06:51:20 +08:00
parent fe185e382b
commit 81d667dbd7
12 changed files with 78 additions and 13 deletions

View File

@@ -1009,8 +1009,12 @@ namespace nana{ namespace widgets
auto ki = keywords.schemes.find(ds.scheme);
if ((ki != keywords.schemes.end()) && ki->second)
{
#ifdef _nana_std_has_emplace_return_type
auto & last = entities.emplace_back();
#else
entities.emplace_back();
auto & last = entities.back();
#endif
last.begin = c_str + pos;
last.end = last.begin + ds.text.size();
last.scheme = ki->second.get();