Recently we added a ported C implementation of GNU getopt library. But that's remained a C solution. What about converting C code in files 'getopt.c' and 'getopt.h' to pure C++ code? Of course, preserving original authorship and license terms.
getopt