Boost logo

Boost :

From: Oleg Abrosimov (beholder_at_[hidden])
Date: 2006-08-05 23:15:32


Gennaro Prota ?????:
> On Sat, 05 Aug 2006 17:29:13 +0700, Oleg Abrosimov
> <beholder_at_[hidden]> wrote:
>
>> Hello,
>> during my work on string_cvt proposal I've faced a problem with MSVC 7.1
>> compiler on WinXP machine. The following code does not compile:
>>
>> [...]
>>
>> template <typename T, typename TCont, typename TManip, typename TDef>
>> inline T foo(TCont const& src, TManip const& manip_, std::locale const&
>> loc, TDef const& def) {
>> return T();
>> }
>>
>> int main()
>> {
>> int k = foo<int>(std::string("123"), std::hex, std::locale(), 1);
>> return 0;
>> }
>
> Did you try writing "&std::hex"?

it works, thanks!
but this works as well
int i = foo(std::string("a"), std::hex, std::locale());

with definition of foo without last parameter

I'll add this issue to string_cvt FAQ

Best,
Oleg Abrosimov


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