Subject: Re: [Boost-bugs] [Boost C++ Libraries] #12136: Propose lexical_cast type traits
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-04-19 05:40:14
#12136: Propose lexical_cast type traits
-------------------------------------+-------------------------------------
Reporter: Tony Lewis | Owner: apolukhin
<tonyelewis@â¦> | Status: new
Type: Feature Requests | Component: lexical_cast
Milestone: To Be Determined | Severity: Optimization
Version: Boost 1.61.0 | Keywords:
Resolution: | lexical_cast,trait,ostreamable,istreamable,lexical_castable
-------------------------------------+-------------------------------------
Comment (by apolukhin):
LexicalCast requires default construction and istreamable/ostreamable from
operator:
{{{
template <class T>
struct is_lcast_istreamable: mpl::bool_<
(is_default_constructible<T>::value &&
(boost::has_right_shift<std::basic_istream<wchar_t>, T>::value ||
boost::has_right_shift<std::basic_istream<char>, T>::value)
)
>
}}}
You can make the `is_lcast_ostreamable` similarly. Or you could just use
the [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4436.pdf
detection idiom].
Anyway, such trait seems to have limited usage. I'd rather not add it and
keep the interface of the LexicalCast library as simple as possible.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/12136#comment:1> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:20 UTC