text
stringlengths
0
2.2M
if (verbose) {
P(u_BSLS_LIBRARYFEATURES_HAS_CPP11_BASELINE_LIBRARY_defined)
}
#if defined(BSLS_LIBRARYFEATURES_HAS_CPP11_BASELINE_LIBRARY)
testSimpleUniformRandomNumberGenerator();
useCpp11Algorithms();
useTypeIndex();
{
int x;
std::reference_wrapper<int> mX = std::ref(x);
std::reference_wrapper<const int> X = std::cref(x);
(void)mX;
(void)X;
}
#endif
if (veryVeryVerbose) P(BSLS_PLATFORM_CMP_VERSION);
} break;
case 1: {
// --------------------------------------------------------------------
// TESTING 'BSLS_LIBRARYFEATURES_HAS_CPP98_AUTO_PTR'
//
// Concerns:
//: 1 The 'BSLS_LIBRARYFEATURES_HAS_CPP98_AUTO_PTR' flag is defined
//: when the native standard library defines type
//: 'native_std::auto_ptr' template in '<memory>'.
//:
//: 2 The 'BSLS_LIBRARYFEATURES_HAS_CPP98_AUTO_PTR' macro is set on all
//: platforms (until C++17).
//
// Plan:
//: 1 When 'BSLS_LIBRARYFEATURES_HAS_CPP98_AUTO_PTR' is defined
//: conditionally compile code that includes '<memory>' and
//: constructs 'native_std::auto_ptr' object for 'int'.
//:
//: 2 Confirm the value of the conditionally compiled global variable
//: 'u_BSLS_LIBRARYFEATURES_HAS_CPP98_AUTO_PTR_defined' is 'true'.
//
// Testing:
// BSLS_LIBRARYFEATURES_HAS_CPP98_AUTO_PTR
// --------------------------------------------------------------------
if (verbose) printf(
"TESTING 'BSLS_LIBRARYFEATURES_HAS_CPP98_AUTO_PTR'\n"
"=================================================\n");
if (verbose) {
P(u_BSLS_LIBRARYFEATURES_HAS_CPP98_AUTO_PTR_defined)
}
#if defined(BSLS_LIBRARYFEATURES_HAS_CPP98_AUTO_PTR)
std::auto_ptr<int> x(new int);
*x = 42;
std::auto_ptr<int> y = x;
ASSERT(!x.get());
ASSERT(42 == *y);
#endif
if (veryVeryVerbose) P(BSLS_PLATFORM_CMP_VERSION);
} break;
case -1: {
// --------------------------------------------------------------------
// TESTING 'BSLS_LIBRARYFEATURES_HAS_CPP17_BOOL_CONSTANT'
//
// Concerns:
//: 1 The 'BSLS_LIBRARYFEATURES_HAS_CPP17_BOOL_CONSTANT' must never be
//: defined.
//
// Plan:
//: 1 Confirm the value of the conditionally compiled global variable
//: 'u_BSLS_LIBRARYFEATURES_HAS_CPP17_BOOL_CONSTANT_defined' is
//: 'false'.
//
// Testing:
// BSLS_LIBRARYFEATURES_HAS_CPP17_BOOL_CONSTANT: obsolescent: never
// defined
// --------------------------------------------------------------------
if (verbose) printf(
"TESTING 'BSLS_LIBRARYFEATURES_HAS_CPP17_BOOL_CONSTANT'\n"
"======================================================\n");
if (verbose) {
P(u_BSLS_LIBRARYFEATURES_HAS_CPP17_BOOL_CONSTANT_defined);
}
#if defined(BSLS_LIBRARYFEATURES_HAS_CPP17_BOOL_CONSTANT)
ASSERT(true == std::bool_constant<true>());
#endif
ASSERT(false ==
u_BSLS_LIBRARYFEATURES_HAS_CPP17_BOOL_CONSTANT_defined);
if (veryVeryVerbose) P(BSLS_PLATFORM_CMP_VERSION);