Fix compile error in buffered streams due to lack of reference collapsing in C++98.

This commit is contained in:
Christopher Kohlhoff 2020-04-07 08:25:02 +10:00
parent 4b37bdbe3e
commit e6e2ff6957
2 changed files with 12 additions and 8 deletions

View File

@ -147,7 +147,8 @@ namespace detail
typedef typename remove_reference<
Stream>::type::lowest_layer_type::executor_type executor_type;
explicit initiate_async_buffered_fill(Stream& next_layer)
explicit initiate_async_buffered_fill(
typename remove_reference<Stream>::type& next_layer)
: next_layer_(next_layer)
{
}
@ -177,7 +178,7 @@ namespace detail
}
private:
Stream& next_layer_;
typename remove_reference<Stream>::type& next_layer_;
};
} // namespace detail
@ -364,7 +365,8 @@ namespace detail
typedef typename remove_reference<
Stream>::type::lowest_layer_type::executor_type executor_type;
explicit initiate_async_buffered_read_some(Stream& next_layer)
explicit initiate_async_buffered_read_some(
typename remove_reference<Stream>::type& next_layer)
: next_layer_(next_layer)
{
}
@ -403,7 +405,7 @@ namespace detail
}
private:
Stream& next_layer_;
typename remove_reference<Stream>::type& next_layer_;
};
} // namespace detail

View File

@ -132,7 +132,8 @@ namespace detail
typedef typename remove_reference<
Stream>::type::lowest_layer_type::executor_type executor_type;
explicit initiate_async_buffered_flush(Stream& next_layer)
explicit initiate_async_buffered_flush(
typename remove_reference<Stream>::type& next_layer)
: next_layer_(next_layer)
{
}
@ -157,7 +158,7 @@ namespace detail
}
private:
Stream& next_layer_;
typename remove_reference<Stream>::type& next_layer_;
};
} // namespace detail
@ -350,7 +351,8 @@ namespace detail
typedef typename remove_reference<
Stream>::type::lowest_layer_type::executor_type executor_type;
explicit initiate_async_buffered_write_some(Stream& next_layer)
explicit initiate_async_buffered_write_some(
typename remove_reference<Stream>::type& next_layer)
: next_layer_(next_layer)
{
}
@ -389,7 +391,7 @@ namespace detail
}
private:
Stream& next_layer_;
typename remove_reference<Stream>::type& next_layer_;
};
} // namespace detail