http://llvm.org/bugs/show_bug.cgi?id=13698

             Bug #: 13698
           Summary: basic_ios constructor throws exception when it
                    provided char type other than char or wchar_t.
           Product: libc++
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: All Bugs
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]
    Classification: Unclassified


Created attachment 9109
  --> http://llvm.org/bugs/attachment.cgi?id=9109
basic_ios patch

libc++ fails to create any classes inherit from basic_ios if they provided char
type other than char or wchar_t. It throw exception during construction, so
there is no chance to imbue own ctype. 

This bug happens because basic_ios::init() calls widen() to initialize __fill_,
 and widen() accesses non-existing ctype. So constructor throws exception.
To fix this, I think basic_ios needs to delay initialization until first time
fill() get called.

I attached a patch to workaround this.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to