text
stringlengths 0
2.2M
|
---|
//:
|
//: 2 If 'BSLS_LIBRARYFEATURES_HAS_C99_SNPRINTF' is defined compile
|
//: code using 'snprintf'.
|
//
|
// Testing:
|
// BSLS_LIBRARYFEATURES_HAS_C99_LIBRARY
|
// BSLS_LIBRARYFEATURES_HAS_C99_SNPRINTF
|
// --------------------------------------------------------------------
|
if (verbose) printf(
|
"TESTING 'BSLS_LIBRARYFEATURES_HAS_C99_*'\n"
|
"========================================\n");
|
if (verbose) {
|
P(u_BSLS_LIBRARYFEATURES_HAS_C99_LIBRARY_defined);
|
P(u_BSLS_LIBRARYFEATURES_HAS_C99_SNPRINTF_defined);
|
}
|
if (u_BSLS_LIBRARYFEATURES_HAS_CPP11_UNIQUE_PTR_defined) {
|
ASSERT(true ==
|
u_BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES_defined);
|
}
|
#ifdef BSLS_LIBRARYFEATURES_HAS_C99_LIBRARY
|
// Test a subset of C99 features
|
// cmath
|
{
|
typedef int (*FuncPtrType)(double);
|
FuncPtrType funcPtr = &native_std::fpclassify;
|
(void)funcPtr; // suppress unused variable warning
|
}
|
// cstdlib
|
{
|
typedef native_std::lldiv_t dummy;
|
dummy x; // suppress unused typedef warning
|
(void)x; // suppress unused variable warning
|
}
|
// cctype
|
{
|
typedef int (*FuncPtrType)(int);
|
FuncPtrType funcPtr = &native_std::isblank;
|
(void)funcPtr; // suppress unused variable warning
|
}
|
#endif
|
#ifdef BSLS_LIBRARYFEATURES_HAS_C99_SNPRINTF
|
(void)&native_std::snprintf;
|
#endif
|
if (veryVeryVerbose) P(BSLS_PLATFORM_CMP_VERSION);
|
} break;
|
case 5: {
|
// --------------------------------------------------------------------
|
// TESTING 'BSLS_LIBRARYFEATURES_HAS_CPP11_UNIQUE_PTR'
|
//
|
// Concerns:
|
//: 1 'BSLS_LIBRARYFEATURES_HAS_CPP11_UNIQUE_PTR' is defined only when
|
//: the native standard library defines the 'unique_ptr' class
|
//: template (in '<memory>').
|
//
|
//: 2 If 'BSLS_LIBRARYFEATURES_HAS_CPP11_UNIQUE_PTR' is defined then
|
//: the related macro
|
//: 'BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES' is also
|
//: defined.
|
//
|
// Plan:
|
//: 1 When 'BSLS_LIBRARYFEATURES_HAS_CPP11_UNIQUE_PTR' is defined
|
//: compile code that includes '<memory>' and constructs a
|
//: 'unique_ptr' object to an 'int'.
|
//:
|
//: 2 If 'BSLS_LIBRARYFEATURES_HAS_CPP11_UNIQUE_PTR' is defined confirm
|
//: that 'BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES' is also
|
//: defined using the associated conditionally initialized global
|
//: variables. See "Global constants for testing invariants" above.
|
//
|
// Testing:
|
// BSLS_LIBRARYFEATURES_HAS_CPP11_UNIQUE_PTR
|
// --------------------------------------------------------------------
|
if (verbose) printf(
|
"TESTING 'BSLS_LIBRARYFEATURES_HAS_CPP11_UNIQUE_PTR'\n"
|
"===================================================\n");
|
if (verbose) {
|
P(u_BSLS_LIBRARYFEATURES_HAS_CPP11_UNIQUE_PTR_defined);
|
}
|
if (u_BSLS_LIBRARYFEATURES_HAS_CPP11_UNIQUE_PTR_defined) {
|
ASSERT(true ==
|
u_BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES_defined);
|
}
|
if (veryVeryVerbose) P(BSLS_PLATFORM_CMP_VERSION);
|
} break;
|
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.