Post by s***@yahoo.comHi,
I am curious whether or not Visual C++ fully supports standard C/C++
APIs. I have gathered the standard C/C++ APIs (mainly from
cplusplus.com) and posted that to the comp.sources.d newsgroup (too
long to be posted here). Can someone kindly scan through the list to
verify if everything standard is supported on Visual C++?
Thanks,
Song
Here it goes:
/*********************** Standard C Library ***********************/
1. cassert (assert.h)
assert: Evaluate assertion (macro)
2. cctype (ctype.h)
isalnum: Check if character is alphanumeric (function)
isalpha: Check if character is alphabetic (function)
iscntrl: Check if character is a control character (function)
isdigit: Check if character is decimal digit (function)
isgraph: Check if character has graphical representation (function)
islower: Check if character is lowercase letter (function)
isprint: Check if character is printable (function)
ispunct: Check if character is a punctuation character (function)
isspace: Check if character is a white-space (function)
isupper: Check if character is uppercase letter (function)
isxdigit: Check if character is hexadecimal digit (function)
tolower: Convert uppercase letter to lowercase (function)
toupper: Convert uppercase letter to uppercase (function)
3. cerrno (errno.h)
errno: Last error number (macro)
4. cfloat (float.h)
FLT_RADIX: Base for all floating-point types (float, double and long
double)
FLT_MANT_DIG/DBL_MANT_DIG/LDBL_MANT_DIG: Precission of significand,
i.e. the number of digits that conform the significand
FLT_DIG/DBL_DIG/LDBL_DIG: Number of decimal digits that can be rounded
into a floating-point and back without change in the number of decimal
digits
FLT_MIN_EXP/DBL_MIN_EXP/LDBL_MIN_EXP: Minimum negative integer value
for the exponent that generates a normalized floating-point number
FLT_MIN_10_EXP/DBL_MIN_10_EXP/LDBL_MIN_10_EXP: Minimum negative
integer value for the exponent of a base-10 expression that whould
generate a normalized floating-point number
FLT_MAX_EXP/DBL_MAX_EXP/LDBL_MAX_EXP: Maximum integer value for the
exponent that generates a normalized floating-point number
FLT_MAX_10_EXP/DBL_MAX_10_EXP/LDBL_MAX_10_EXP: Maximum integer value
for the exponent of a base-10 expression that whould generate a
normalized floating-point number
FLT_MAX/DBL_MAX/LDBL_MAX: Maximum finite representable floating-point
number
FLT_EPSILON/DBL_EPSILON/LDBL_EPSILON: Difference between 1 and the
least value greater than 1 that is representable
FLT_MIN/DBL_MIN/LDBL_MIN: Minimum representable floating-point number
5. climits (limits.h)
CHAR_BIT: Number of bits for a char object (byte)
SCHAR_MIN: Minimum value for an object of type signed char
SCHAR_MAX: Maximum value for an object of type signed char
UCHAR_MAX: Maximum value for an object of type unsigned char
CHAR_MIN: Minimum value for an object of type char
CHAR_MAX: Maximum value for an object of type char
MB_LEN_MAX: Maximum number of bytes in a multibyte character, for any
locale
SHRT_MIN: Minimum value for an object of type short int
SHRT_MAX: Maximum value for an object of type short int
USHRT_MAX: Maximum value for an object of type unsigned short int
INT_MIN: Minimum value for an object of type int
INT_MAX: Maximum value for an object of type int
UINT_MAX: Maximum value for an object of type unsigned int
LONG_MIN: Minimum value for an object of type long int
LONG_MAX: Maximum value for an object of type long int
ULONG_MAX: Maximum value for an object of type unsigned long int
6. clocale (locale.h)
setlocale: Set or retrieve locale (function)
localeconv: Get locale formatting parameters for quantities (function)
lconv: Formatting info for numeric values (type)
7. cmath (math.h)
cos: Compute cosine (function)
sin: Compute sine (function)
tan: Compute tangent (function)
acos: Compute arc cosine (function)
asin: Compute arc sine (function)
atan: Compute arc tangent (function)
atan2: Compute arc tangent with two parameters (function)
cosh: Compute hyperbolic cosine (function)
sinh: Compute hyperbolic sine (function)
tanh: Compute hyperbolic tangent (function)
exp: Compute exponential function (function)
frexp: Get significand and exponent (function)
ldexp: Generate number from significand and exponent (function)
log: Compute natural logarithm (function)
log10: Compute base-10 logarithm (function)
modf: Break into fractional and integral parts (function)
pow: Raise to power (function)
sqrt: Compute square root (function)
ceil: Round up value (function)
fabs: Compute absolute value (function)
floor: Round down value (function)
fmod: Compute remainder of division (function)
8. csetjmp (setjmp.h)
longjmp : Long jump (function)
setjmp: Save calling environment for long jump (macro)
jmp_buf: Type to hold information to restore calling environment
(type)
9. csignal (signal.h)
signal: Set function to handle signal (function)
raise: Generates a signal (function)
sig_atomic_t: Integral type (type)
SIGABRT/SIGILL/SIGSEGV/SIG_DFL/SIG_IGN/SIGFPE/SIGINT/SIGTERM/SIG_ERROR
etc: macro contant values
10. cstdarg (stdarg.h)
va_list: Type to hold information about variable arguments (type)
va_start: Initialize a variable argument list (macro)
va_arg: Retrieve next argument (macro)
va_end: End using variable argument list (macro)
11. cstddef (stddef.h)
ptrdiff_t: Result of pointer subtraction (type)
size_t: Unsigned integral type (type)
offsetof: Return member offset (macro)
NULL: Null pointer (macro)
12. cstdio (stdio.h)
remove: Remove file (function)
rename: Rename file (function)
tmpfile: Open a temporary file (function)
tmpnam: Generate temporary filename (function)
fclose: Close file (function)
fflush: Flush stream (function)
fopen: Open file (function)
freopen: Reopen stream with different file or mode (function)
setbuf: Set stream buffer (function)
setvbuf: Change stream buffering (function)
fprintf: Write formatted output to stream (function)
fscanf: Read formatted data from stream (function)
printf: Print formatted data to stdout (function)
scanf: Read formatted data from stdin (function)
sprintf: Write formatted data to string (function)
sscanf: Read formatted data from string (function)
vfprintf: Write formatted variable argument list to stream (function)
vprintf: Print formatted variable argument list to stdout (function)
vsprintf: Print formatted variable argument list to string (function)
fgetc: Get character from stream (function)
fgets: Get string from stream (function)
fputc: Write character to stream (function)
fputs: Write string to stream (function)
getc: Get character from stream (function)
getchar: Get character from stdin (function)
gets: Get string from stdin (function)
putc: Write character to stream (function)
putchar: Write character to stdout (function)
puts: Write string to stdout (function)
ungetc: Unget character from stream (function)
fread: Read block of data from stream (function)
fwrite: Write block of data to stream (function)
fgetpos: Get current position in stream (function)
fseek: Reposition stream position indicator (function)
fsetpos: Set position indicator of stream (function)
ftell: Get current position in stream (function)
rewind: Set position indicator to the beginning (function)
clearerr: Clear error indicators (function)
feof: Check End-of-File indicator (function)
ferror: Check error indicator (function)
perror: Print error message (function)
EOF: End-of-File (constant)
FILENAME_MAX: Maximum length of file names (constant)
NULL: Null pointer (constant)
TMP_MAX: Number of temporary files (constant)
_IOFBF/_IOLBF/_IONBF/BUFSIZ/FOPEN_MAX/L_tmpnam/SEEK_CUR/SEEK_END/
SEEK_SET: constants
FILE: Object containing information to control a stream (type)
fpos_t: Object containing information to specify a position within a
file (type)
size_t: Unsigned integral type (type)
13. cstdlib (stdlib.h)
atof: Convert string to double (function)
atoi: Convert string to integer (function)
atol: Convert string to long integer (function)
strtod: Convert string to double (function)
strtol: Convert string to long integer (function)
strtoul: Convert string to unsigned long integer (function)
rand: Generate random number (function)
srand: Initialize random number generator (functions)
calloc: Allocate space for array in memory (function)
free: Deallocate space in memory (function)
malloc: Allocate memory block (function)
realloc: Reallocate memory block (function)
abort: Abort current process (function)
atexit: Set function to be executed on exit (function)
exit: Terminate calling process (function)
getenv: Get environment string (function)
system: Execute system command (function)
bsearch: Binary search in array (function)
qsort: Sort elements of array (function)
abs: Absolute value (function)
div: Integral division (function)
labs: Absolute value (function)
ldiv: Integral division (function)
mblen: Get length of multibyte character (function)
mbtowc: Convert multibyte character to wide character (function)
wctomb: Convert wide character to multibyte character (function)
mbstowcs: Convert multibyte string to wide-character string (function)
wcstombs: Convert wide-character string to multibyte string (function)
EXIT_FAILURE: Failure termination code (macro)
EXIT_SUCCESS: Success termination code (macro)
MB_CUR_MAX: Maximum size of multibyte characters (macro)
NULL: Null pointer (macro)
RAND_MAX: Maximum value returned by rand (macro)
div_t: Structure returned by div (type)
ldiv_t: Structure returned by div and ldiv (type)
size_t: Unsigned integral type (type)
14. cstring (string.h)
memcpy: Copy block of memory (function)
memmove: Move block of memory (function)
strcpy: Copy string (function)
strncpy: Copy characters from string (function)
strcat: Concatenate strings (function)
strncat: Append characters from string (function)
memcmp: Compare two blocks of memory (function)
strcmp: Compare two strings (function)
strcoll: Compare two strings using locale (function)
strncmp: Compare characters of two strings (function)
strxfrm: Transform string using locale (function)
memchr: Locate character in block of memory (function)
strchr: Locate first occurrence of character in string (function)
strcspn: Get span until character in string (function)
strpbrk: Locate character in string (function)
strrchr: Locate last occurrence of character in string (function)
strspn: Get span of character set in string (function)
strstr: Locate substring (function)
strtok: Split string into tokens (function)
memset: Fill block of memory (function)
strerror: Get pointer to error message string (function)
strlen: Get string length (function)
NULL: Null pointer (macro)
size_t: Unsigned integral type (type)
15. ctime (time.h)
clock: Clock program (function)
difftime: Return difference between two times (function)
mktime: Convert tm structure to time_t (function)
time: Get current time (function)
asctime: Convert tm structure to string (function)
ctime: Convert time_t value to string (function)
gmtime: Convert time_t to tm as UTC time (function)
localtime: Convert time_t to tm as local time (function)
strftime: Format time to string (function)
CLOCKS_PER_SEC: Clock ticks per second (macro)
NULL: Null pointer (macro)
clock_t: Clock type (type)
size_t: Unsigned integral type (type)
time_t: Time type (type)
struct tm: Time structure (type)
//////////////////////////// Standard IOstream
Library ///////////////////////////
ios_base: Base class with type-independent members for the standard
stream classes (class)
ios: Base class with type-dependent members for the standard stream
classes (class)
istream: Input stream (class)
ostream: Output Stream (class)
iostream: Input/Output Stream (class)
ifstream: Input file stream class (class)
ofstream: Output file stream (class)
fstream: Input/output file stream class (class)
istringstream: Input string stream class (class)
ostringstream: Output string stream class (class)
stringstream: Input/output string stream class (class)
streambuf: Base buffer class for streams (class)
filebuf: File stream buffer (class)
stringbuf: String stream buffer (class)
cin: Standard input stream (object)
cout: Standard output stream (object)
cerr: Standard output stream for errors (object)
clog: Standard output stream for logging (object)
fpos: Stream position class template (class template)
streamoff: Stream offset type (type)
streampos: Stream position type (type)
streamsize: Stream size type (types)
boolalpha: Alphanumerical bool values (manipulator function)
dec: Use decimal base (manipulator function)
endl: Insert newline and flush (manipulator function)
ends: Insert null character (manipulator function)
fixed: Use fixed-point notation (manipulator function)
flush: Flush stream buffer (manipulator function)
hex: Use hexadecimal base (manipulator function)
internal: Adjust field by inserting characters at an internal position
(manipulator function)
left: Adjust output to the left (manipulator function)
noboolalpha: No alphanumerical bool values (manipulator function)
noshowbase: Do not show numerical base prefixes (manipulator function)
noshowpoint: Do not show decimal point (manipulator function)
noshowpos: Do not show positive signs (manipulator function)
noskipws: Do not skip whitespaces (manipulator function)
nounitbuf: Do not force flushes after insertions (manipulator
function)
nouppercase: Do not generate upper case letters (manipulator function)
oct: Use octal base (manipulator function)
resetiosflags: Reset format flags (manipulator function)
right: Adjust output to the right (manipulator function)
scientific: Use scientific notation (manipulator function)
setbase: Set basefield flag (manipulator function)
setfill: Set fill character (manipulator function)
setiosflags: Set format flags (manipulator function)
setprecision: Set decimal precision (manipulator function)
setw: Set field width (manipulator function)
showbase: Show numerical base prefixes (manipulator function)
showpoint: Show decimal point (manipulator function)
showpos: Show positive signs (manipulator function)
skipws: Skip whitespaces (manipulator function)
unitbuf: Flush buffer after insertions (manipulator function)
uppercase: Generate upper-case letters (manipulator function)
ws: Extract whitespaces (manipulator function)
//////////////////////////// Standard C++ Strings
Library ///////////////////////////
string: String class (class)
char_traits: Character traits (class template)
operator+: Add strings (function)
swap: Swap contents of two strings (function)
comparison operators: String comparison operators (function)
getline: Get line from stream (function)
operator<<: Insert string into stream (function)
operator>>: Extract string from istream (function)
//////////////////////////// STL
Containers ///////////////////////////
vector: Vector (class template)
deque: Double ended queue (class template)
list: List (class template)
stack: LIFO stack (class template)
queue: FIFO queue (class template)
priority_queue: Priority queue (class template)
set: Set (class template)
multiset: Multiple-key set (class template)
map: Map (class template)
multimap: Multiple-key map (class template)
bitset: Bitset (class template)
//////////////////////////// STL
Algorithms ///////////////////////////
for_each: Apply function to range (template function)
find: Find value in range (function template)
find_if: Find element in range (function template)
find_end: Find last subsequence in range (function template)
find_first_of: Find element from set in range (function template)
adjacent_find: Find equal adjacent elements in range (function
template)
count: Count appearances of value in range (function template)
count_if: Return number of elements in range satisfying condition
(function template)
mismatch: Return first position where two ranges differ (function
template)
equal: Test whether the elements in two ranges are equal (function
template)
search: Find subsequence in range (function template)
search_n: Find succession of equal values in range (function template)
copy: Copy range of elements (function template)
copy_backward: Copy range of elements backwards (function template)
swap: Exchange values of two objects (function template)
swap_ranges: Exchange values of two ranges (function template)
iter_swap: Exchange values of objects pointed by two iterators
(function template)
transform: Apply function to range (function template)
replace: Replace value in range (function template)
replace_if: Replace values in range (function template)
replace_copy: Copy range replacing value (function template)
replace_copy_if: Copy range replacing value (function template)
fill: Fill range with value (function template)
fill_n: Fill sequence with value (function template)
generate: Generate values for range with function (function template)
generate_n: Generate values for sequence with function (function
template)
remove: Remove value from range (function template)
remove_if: Remove elements from range (function template)
remove_copy: Copy range removing value (function template)
remove_copy_if: Copy range removing values (function template)
unique: Remove consecutive duplicates in range (function template)
unique_copy: Copy range removing duplicates (function template)
reverse: Reverse range (function template)
reverse_copy: Copy range reversed (function template)
rotate: Rotate elements in range (function template)
rotate_copy: Copy rotated range (function template)
random_shuffle: Rearrangle elements in range randomly (function
template)
partition: Partition range in two (function template)
stable_partition: Divide range in two groups - stable ordering
(function template)
sort: Sort elements in range (function template)
stable_sort: Sort elements preserving order of equivalents (function
template)
partial_sort: Partially Sort elements in range (function template)
partial_sort_copy: Copy and partially sort range (function template)
nth_element: Sort element in range (function template)
lower_bound: Return iterator to lower bound (function template)
upper_bound: Return iterator to upper bound (function template)
equal_range: Get subrange of equal elements (function template)
binary_search: Test if value exists in sorted array (function
template)
merge: Merge sorted ranges (function template)
inplace_merge: Merge consecutive sorted ranges (function template)
includes: Test whether sorted range includes another sorted range
(function template)
set_union: Union of two sorted ranges (function template)
set_intersection: Intersection of two sorted ranges (function
template)
set_difference: Difference of two sorted ranges (function template)
set_symmetric_difference: Symmetric difference of two sorted ranges
(function template)
push_heap: Push element into heap range (function template)
pop_heap: Pop element from heap range (function template)
make_heap: Make heap from range (function template)
sort_heap: Sort elements of heap (function template)
min: Return the lesser of two arguments (function template)
max: Return the greater of two arguments (function template)
min_element: Return smallest element in range (function template)
max_element: Return largest element in range (function template)
lexicographical_compare: Lexicographical less-than comparison
(function template)
next_permutation: Transform range to next permutation (function
template)
prev_permutation: Transform range to previous permutation (function
template)
//////////////////////////// STL Function
Adaptors ///////////////////////////
// Defined in the standard header <functional>, and in the nonstandard
backward-compatibility header <function.h>
bind2nd(y): Call binary function with y as the 2nd argument
bind1st(x): Call binary function with x as the 1st argument
mem_fun/mem_fun_ref: Converts a member function to a functor (so that
it can be used as an argument to an algorithm)
ptr_fun: Converts a function pointer to a functor (so that it can be
used as an argument to an algorithm)
not1: Takes a unary predicate and returns its complement
not2: Takes a binary predicate and returns its complement
//////////////////////////// STL Allocator
Functions ///////////////////////////
allocate(n): Allocates space for n objects
deallocate(p, n): Deallocate space for n objects
construct(T1* p, const T2& value): Create an object of type T1 at the
location pointed to by p
destroy(T* pointer): Destroy the object pointed to by pointer by
calling the destructor T::~T(). The memory pointed to by pointer is
not deallocated, and can be reused for some other object
destroy(ForwardIterator first, ForwardIterator last): Destroys all of
the objects in the range of elements [first, last). It is equivalent
to calling destroy(&*i) for each iterator i in the range [first, last)
uninitialized_copy(InputIterator first, InputIterator last,
ForwardIterator result): If each iterator in the range [result, result
+ (last - first)) points to uninitialized memory, then
uninitialized_copy creates a copy of [first, last) in that range
uninitialized_fill(ForwardIterator first, ForwardIterator last, const
T& x): If each iterator in the range [first, last) points to
uninitialized memory, then uninitialized_fill creates copies of x in
that range
uninitialized_fill_n(ForwardIterator first, Size n, const T& x): If
each iterator in the range [first, first + n) points to uninitialized
memory, then uninitialized_fill_n creates copies of x in that range
get_temporary_buffer(ptrdiff_t len, T*): Requests a buffer that is
aligned for objects of type T and that is large enough to hold len
objects of type T
return_temporary_buffer(T* p): Deallocate memory that was allocated
using get_temporary_buffer