[LLVMbugs] [Bug 12321] New: error_category has a private constructor.

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Mar 21 08:37:53 PDT 2012


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

             Bug #: 12321
           Summary: error_category has a private constructor.
           Product: libc++
           Version: unspecified
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: All Bugs
        AssignedTo: hhinnant at apple.com
        ReportedBy: yzabuair at hotmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


The constructor in error_category in the <system_error> header has a private
constructor.  This prevents users from creating their own error categories by
deriving from error_category.

Internally it looks like libc++ uses the class __do_message which is declared
as a friend of error_category to setup its own error categories.

Should we use __do_messages as library users to create our own error categories
(it is marked _LIBCPP_HIDDEN)?

or

The private constructor in error_category is a mistake.

Thanks,
Yasser

-- 
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.



More information about the llvm-bugs mailing list