aboutsummaryrefslogtreecommitdiff
path: root/include/fmt/args.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/fmt/args.h')
-rw-r--r--include/fmt/args.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/include/fmt/args.h b/include/fmt/args.h
index 2d684e7c..ad1654bb 100644
--- a/include/fmt/args.h
+++ b/include/fmt/args.h
@@ -22,8 +22,9 @@ template <typename T> struct is_reference_wrapper : std::false_type {};
template <typename T>
struct is_reference_wrapper<std::reference_wrapper<T>> : std::true_type {};
-template <typename T> const T& unwrap(const T& v) { return v; }
-template <typename T> const T& unwrap(const std::reference_wrapper<T>& v) {
+template <typename T> auto unwrap(const T& v) -> const T& { return v; }
+template <typename T>
+auto unwrap(const std::reference_wrapper<T>& v) -> const T& {
return static_cast<const T&>(v);
}
@@ -50,7 +51,7 @@ class dynamic_arg_list {
std::unique_ptr<node<>> head_;
public:
- template <typename T, typename Arg> const T& push(const Arg& arg) {
+ template <typename T, typename Arg> auto push(const Arg& arg) -> const T& {
auto new_node = std::unique_ptr<typed_node<T>>(new typed_node<T>(arg));
auto& value = new_node->value;
new_node->next = std::move(head_);
@@ -110,14 +111,14 @@ class dynamic_format_arg_store
friend class basic_format_args<Context>;
- unsigned long long get_types() const {
+ auto get_types() const -> unsigned long long {
return detail::is_unpacked_bit | data_.size() |
(named_info_.empty()
? 0ULL
: static_cast<unsigned long long>(detail::has_named_args_bit));
}
- const basic_format_arg<Context>* data() const {
+ auto data() const -> const basic_format_arg<Context>* {
return named_info_.empty() ? data_.data() : data_.data() + 1;
}