diff options
author | Eugene Kosov <claprix@yandex.ru> | 2020-03-06 17:02:28 +0300 |
---|---|---|
committer | Eugene Kosov <claprix@yandex.ru> | 2020-03-06 17:08:25 +0300 |
commit | 90a1845e8083c7c71c021c4d79b4a5ce06ea56de (patch) | |
tree | b40332af9ad3df9bc996d36ea0db1c5603e4c0df | |
parent | 0939ff30faf3ba22277a7c64a7c0a62b55bad7d4 (diff) | |
download | mariadb-git-10.5-for-marko.tar.gz |
allow creating span<T> from const T buf[2]10.5-for-marko
-rw-r--r-- | storage/innobase/include/span.h | 3 | ||||
-rw-r--r-- | storage/innobase/log/log0log.cc | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/storage/innobase/include/span.h b/storage/innobase/include/span.h index 3a056baee4d..3857f591123 100644 --- a/storage/innobase/include/span.h +++ b/storage/innobase/include/span.h @@ -20,12 +20,13 @@ this program; if not, write to the Free Software Foundation, Inc., #include <cstddef> #include <iterator> +#include <type_traits> namespace st_ { template <class ElementType> class span { public: - typedef ElementType element_type; + using element_type = typename std::remove_cv<ElementType>::type; typedef ElementType value_type; typedef size_t index_type; typedef ptrdiff_t difference_type; diff --git a/storage/innobase/log/log0log.cc b/storage/innobase/log/log0log.cc index 34c82759f95..51b51facce2 100644 --- a/storage/innobase/log/log0log.cc +++ b/storage/innobase/log/log0log.cc @@ -1012,7 +1012,7 @@ func_exit: buf[0]= FILE_CHECKPOINT | (8 + 6); mach_write_to_8(&buf[1], flush_lsn); mach_write_to_4(&buf[1 + 8 + 6], ut_crc32(buf, 1 + 8 + 6)); - log_sys.append_to_main_log({buf, sizeof buf}); + log_sys.append_to_main_log(buf); log_mutex_enter(); |