Boost logo

Boost :

Subject: Re: [boost] [lexical_cast] char types and UDTs
From: Antony Polukhin (antoshkka_at_[hidden])
Date: 2012-04-13 00:15:10


2012/4/12 Nathan Ridge <zeratul976_at_[hidden]>:
>
>> There is one more solution: determinate stream_char<>::type for
>> UserType using lots of meta-programming. For that solution following
>> meta-functions required:
>>     has_output_stream_operator_for_char<UserType>::value
>>     has_output_stream_operator_for_wchar_t<UserType>::value
>>     has_output_stream_operator_for_char16_t<UserType>::value
>>     has_output_stream_operator_for_char32_t<UserType>::value
>>
>> Is there any ideas, how that can be done in a *portable* way?
>
> Perhaps Boost.TTI can be of help?

Boost.TypeTraits looks like a good solution. Using has_left_shift<>
and has_right_shift<> it is possible to create required
meta-functions.

Created ticket #6786

-- 
Best regards,
Antony Polukhin

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk