Consider the following code snippet:// g++ -o span01 -Wall -Wextra -pedantic -std=c++14 -I GSL/include span01.cpp#include <iostream>#include <fstream>#include <vector>#include <algorithm>#include <gsl/span>// See e.g. http://codexpert.ro/blog/2016/03/07/guidelines-support-library-review-spant/template <typename T>void write_data_pass_by_const_ref(gsl::span<T> const & s, std::string const & filename){    std::ofstream file(filename);    std::copy(std::begin(s), std::end(s),              std::ostream_iterator<T>(file, \n));}// See e.g. https://github.com/Microsoft/GSL/issues/380#issuecomment-250842034template <typename T>void write_data_pass_by_value(gsl::span<T> const s, std::string const & filename){    std::ofstream file(filename);    std::copy(std::begin(s), std::end(s),              std::ostream_iterator<T>(file, \n));}int main(){    std::vector<int> v {1, 2, 3, 4, 5};    write_data_pass_by_const_ref(gsl::make_span(v), vector_const_ref.txt);    write_data_pass_by_value(gsl::make_span(v), vector_value.txt);}Which version of write_data is better? What are the best practices on how to pass a gsl::span<T> object as parameter? I've found both kind of examples on various blogs, so I'm unsure about how I should use them.
Is it better to pass a gsl::span object by value or by reference?
c++;c++14