cast_to.hpp
Go to the documentation of this file.
/*
restinio
*/
#pragma once
#include <string>
#include <restinio/string_view.hpp>
#include <restinio/utils/from_string.hpp>
namespace restinio
{
//
// cast_to()
//
template < typename Value_Type >
Value_Type
cast_to( string_view_t str_representation )
{
return utils::from_string< Value_Type >( str_representation );
}
} /* namespace restinio */
from_string.hpp
restinio
Definition: asio_include.hpp:21
restinio::string_view_t
nonstd::string_view string_view_t
Definition: string_view.hpp:19
restinio::cast_to
Value_Type cast_to(string_view_t str_representation)
Cast string representation to a given type.
Definition: cast_to.hpp:27
string_view.hpp