first commit
This commit is contained in:
531
extern/stdcxx/4.2.1/tests/intro/17.extensions.cpp
vendored
Normal file
531
extern/stdcxx/4.2.1/tests/intro/17.extensions.cpp
vendored
Normal file
@@ -0,0 +1,531 @@
|
||||
/************************************************************************
|
||||
*
|
||||
* extensions.cpp - compilation only test exercising the ability
|
||||
* to compile library headers with extensions diabled
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
************************************************************************
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed
|
||||
* with this work for additional information regarding copyright
|
||||
* ownership. The ASF licenses this file to you under the Apache
|
||||
* License, Version 2.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* permissions and limitations under the License.
|
||||
*
|
||||
* Copyright 1994-2008 Rogue Wave Software.
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
#undef _RWSTD_NO_EXTENSIONS
|
||||
#define _RWSTD_NO_EXTENSIONS
|
||||
|
||||
|
||||
// working around a SunOS/SunPro bug (PR #26255)
|
||||
#if defined (__SUNPRO_CC) && (defined (__SunOS_5_8) || defined (__SunOS_5_9))
|
||||
# include <time.h>
|
||||
#endif // SunPro && SunOS 5.{8,9}
|
||||
|
||||
#include <cassert>
|
||||
#include <cctype>
|
||||
#include <cerrno>
|
||||
#include <cfloat>
|
||||
#include <ciso646>
|
||||
#include <climits>
|
||||
#include <clocale>
|
||||
#include <cmath>
|
||||
#include <csetjmp>
|
||||
#include <csignal>
|
||||
#include <cstdarg>
|
||||
#include <cstddef>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <ctime>
|
||||
#include <cwchar>
|
||||
#include <cwctype>
|
||||
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
#include <float.h>
|
||||
#include <iso646.h>
|
||||
#include <limits.h>
|
||||
#include <locale.h>
|
||||
#include <math.h>
|
||||
#include <setjmp.h>
|
||||
#include <signal.h>
|
||||
#include <stdarg.h>
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include <wchar.h>
|
||||
#include <wctype.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <bitset>
|
||||
#include <complex>
|
||||
#include <deque>
|
||||
#include <exception>
|
||||
#include <fstream>
|
||||
#include <functional>
|
||||
#include <iomanip>
|
||||
#include <ios>
|
||||
#include <iosfwd>
|
||||
#include <iostream>
|
||||
#include <istream>
|
||||
#include <iterator>
|
||||
#include <limits>
|
||||
#include <list>
|
||||
#include <locale>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <new>
|
||||
#include <numeric>
|
||||
#include <ostream>
|
||||
#include <queue>
|
||||
#include <set>
|
||||
#include <sstream>
|
||||
#include <stack>
|
||||
#include <stdexcept>
|
||||
#include <streambuf>
|
||||
#include <string>
|
||||
#include <typeinfo>
|
||||
#include <utility>
|
||||
#include <valarray>
|
||||
#include <vector>
|
||||
|
||||
/***********************************************************************/
|
||||
|
||||
int count_called = 0;
|
||||
int count_pred_called = 0;
|
||||
int distance_called = 0;
|
||||
|
||||
|
||||
#if !defined (__SUNPRO_CC) || __SUNPRO_CC > 0x550
|
||||
|
||||
template <class T, class U>
|
||||
void count (T, T, const U&, ...) { ++count_called; }
|
||||
|
||||
|
||||
template <class T, class U>
|
||||
void count_if (T, T, U, ...) { ++count_pred_called; }
|
||||
|
||||
|
||||
template <class T>
|
||||
void distance (T, T, ...) { ++distance_called; }
|
||||
|
||||
#else
|
||||
|
||||
// working around a SunPro bug (PR #28678)
|
||||
|
||||
template <class T, class U>
|
||||
void count (T, T, const U&, std::size_t&) { ++count_called; }
|
||||
|
||||
|
||||
template <class T, class U>
|
||||
void count_if (T, T, U, std::size_t&) { ++count_pred_called; }
|
||||
|
||||
|
||||
template <class T>
|
||||
void distance (T, T, std::size_t&) { ++distance_called; }
|
||||
|
||||
#endif // SunPro
|
||||
|
||||
|
||||
#if !defined (__GNUG__) || __GNUG__ > 2
|
||||
|
||||
int ellipsis_called /* = 0 */;
|
||||
|
||||
struct NumGet: std::num_get<char>
|
||||
{
|
||||
typedef std::num_get<char> Base;
|
||||
|
||||
# ifndef _RWSTD_NO_USING_ACCESS_ADJUSTMENT
|
||||
|
||||
_USING (Base::get);
|
||||
|
||||
# else // if defined (_RWSTD_NO_USING_ACCESS_ADJUSTMENT)
|
||||
|
||||
Base::get;
|
||||
|
||||
# endif // _RWSTD_NO_USING_ACCESS_ADJUSTMENT
|
||||
|
||||
iter_type get (iter_type, iter_type,
|
||||
std::ios_base&, std::ios_base::iostate&, ...) const {
|
||||
++ellipsis_called;
|
||||
return iter_type ();
|
||||
}
|
||||
};
|
||||
|
||||
#endif // gcc > 2.x
|
||||
|
||||
|
||||
template <class T>
|
||||
struct convertible
|
||||
{
|
||||
operator T () const {
|
||||
static union {
|
||||
void *dummy;
|
||||
char buffer [sizeof (T)];
|
||||
} u;
|
||||
|
||||
return (T)*u.buffer;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
struct base { /* empty */ };
|
||||
struct badbit_set: base { /* empty */ };
|
||||
struct eofbit_set: base { /* empty */ };
|
||||
struct failbit_set: base { /* empty */ };
|
||||
|
||||
struct Bin: base { /* empty */ } *bin;
|
||||
struct Nolock: base { /* empty */ } *nolock;
|
||||
struct NolockBuf: base { /* empty */ } *nolockbuf;
|
||||
|
||||
|
||||
struct IosBase: std::ios_base
|
||||
{
|
||||
static bool check (int, base*) { return true; }
|
||||
static bool check (int, ...) { return false; }
|
||||
|
||||
// members are preferred over non-members during unqualified lookup
|
||||
static bool check_badbit () { return check (0, (badbit_set*)0); }
|
||||
static bool check_eofbit () { return check (0, (eofbit_set*)0); }
|
||||
static bool check_failbit () { return check (0, (failbit_set*)0); }
|
||||
|
||||
static bool check_bin () { return check (0, bin); }
|
||||
|
||||
static bool check_nolock () { return check (0, nolock); }
|
||||
static bool check_nolockbuf () { return check (0, nolockbuf); }
|
||||
};
|
||||
|
||||
|
||||
_RWSTD_NAMESPACE (std) {
|
||||
|
||||
|
||||
// define bogus primary templates to verify
|
||||
// that they are not defined by the library
|
||||
|
||||
#ifdef _RWSTD_NO_EXT_CHAR_TRAITS_PRIMARY
|
||||
|
||||
template <class charT>
|
||||
struct char_traits { /* empty */ };
|
||||
|
||||
#endif // _RWSTD_NO_EXT_CHAR_TRAITS_PRIMARY
|
||||
|
||||
|
||||
#ifdef _RWSTD_NO_EXT_CODECVT_PRIMARY
|
||||
|
||||
template <class internT, class externT, class stateT>
|
||||
struct codecvt { /* empty */ };
|
||||
|
||||
#endif // _RWSTD_NO_EXT_CODECVT_PRIMARY
|
||||
|
||||
|
||||
#ifdef _RWSTD_NO_EXT_CTYPE_PRIMARY
|
||||
|
||||
template <class charT>
|
||||
struct ctype { /* empty */ };
|
||||
|
||||
#endif // _RWSTD_NO_EXT_CTYPE_PRIMARY
|
||||
|
||||
|
||||
#ifdef _RWSTD_NO_EXT_COLLATE_PRIMARY
|
||||
|
||||
template <class charT>
|
||||
struct collate { /* empty */ };
|
||||
|
||||
#endif // _RWSTD_NO_EXT_COLLATE_PRIMARY
|
||||
|
||||
|
||||
#ifdef _RWSTD_NO_EXT_MONEYPUNCT_PRIMARY
|
||||
|
||||
template <class charT, bool Intl>
|
||||
struct moneypunct { /* empty */ };
|
||||
|
||||
#endif // _RWSTD_NO_EXT_MONEYPUNCT_PRIMARY
|
||||
|
||||
|
||||
#ifdef _RWSTD_NO_EXT_NUMPUNCT_PRIMARY
|
||||
|
||||
template <class charT>
|
||||
struct numpunct { /* empty */ };
|
||||
|
||||
#endif // _RWSTD_NO_EXT_NUMPUNCT_PRIMARY
|
||||
|
||||
|
||||
#ifdef _RWSTD_NO_EXT_TIME_GET_PRIMARY
|
||||
|
||||
template <class charT, class InputIterator>
|
||||
struct time_get { /* empty */ };
|
||||
|
||||
#endif // _RWSTD_NO_EXT_TIME_GET_PRIMARY
|
||||
|
||||
|
||||
#ifdef _RWSTD_NO_EXT_TIME_PUT_PRIMARY
|
||||
|
||||
template <class charT, class OutputIterator>
|
||||
struct time_put { /* empty */ };
|
||||
|
||||
#endif // _RWSTD_NO_EXT_TIME_PUT_PRIMARY
|
||||
|
||||
|
||||
#ifdef _RWSTD_NO_EXT_MESSAGES_PRIMARY
|
||||
|
||||
template <class charT>
|
||||
struct messages { /* empty */ };
|
||||
|
||||
#endif // _RWSTD_NO_EXT_MESSAGES_PRIMARY
|
||||
|
||||
} // namespace std
|
||||
|
||||
/***********************************************************************/
|
||||
|
||||
#include <driver.h>
|
||||
|
||||
bool predicate (int /* unused */) { return true; }
|
||||
|
||||
static int
|
||||
run_test (int /* unused */, char* /* unused */ [])
|
||||
{
|
||||
// exercise _RWSTD_NO_EXT_VOID_COUNT
|
||||
rw_info (0, 0, __LINE__, "_RWSTD_NO_EXT_VOID_COUNT");
|
||||
|
||||
std::reverse_iterator<int*> it (0);
|
||||
|
||||
std::size_t n = 0;
|
||||
|
||||
#ifndef _RWSTD_NO_EXT_VOID_COUNT
|
||||
rw_assert (0, __FILE__, __LINE__,
|
||||
"_RWSTD_NO_EXT_VOID_COUNT not #defined");
|
||||
#endif
|
||||
|
||||
// call the 4-argument overload of count() and expect Koenig lookup
|
||||
// to find ::count(); the std::count() extension will be preferred
|
||||
// if it exists and is a viable candidate, in which case the test
|
||||
// below will fail
|
||||
count (it, it, 0, n);
|
||||
|
||||
rw_assert (1 == count_called, __FILE__, __LINE__,
|
||||
"_RWSTD_NO_EXTENSIONS #defined and an extended "
|
||||
"definition of std::count() found");
|
||||
|
||||
// call the 4-argument overload of count() and expect Koenig lookup
|
||||
// to find ::count(); the std::count() extension will be preferred
|
||||
// if it exists and is a viable candidate
|
||||
count_if (it, it, predicate, n);
|
||||
|
||||
rw_assert (1 == count_pred_called, __FILE__, __LINE__,
|
||||
"_RWSTD_NO_EXTENSIONS #defined and an extended "
|
||||
"definition of std::count_if() found");
|
||||
|
||||
|
||||
// exercise _RWSTD_NO_EXT_VOID_DISTANCE
|
||||
rw_info (0, 0, __LINE__, "_RWSTD_NO_EXT_VOID_DISTANCE");
|
||||
|
||||
#ifndef _RWSTD_NO_EXT_VOID_DISTANCE
|
||||
rw_assert (0, __FILE__, __LINE__,
|
||||
"_RWSTD_NO_EXT_VOID_DISTANCE not #defined");
|
||||
#endif
|
||||
|
||||
// call the 3-argument overload of distance() and expect Koenig
|
||||
// lookup to find ::distance(); std::distance() will be preferred
|
||||
// if it exists and is a viable candidate
|
||||
distance (it, it, n);
|
||||
|
||||
rw_assert (1 == distance_called, __FILE__, __LINE__,
|
||||
"_RWSTD_NO_EXTENSIONS #defined and an extended "
|
||||
"definition of std::distance() found");
|
||||
|
||||
|
||||
// exercise _RWSTD_NO_EXT_NUM_GET
|
||||
rw_info (0, 0, __LINE__, "_RWSTD_NO_EXT_NUM_GET");
|
||||
|
||||
#ifndef _RWSTD_NO_EXT_NUM_GET
|
||||
rw_assert (0, __FILE__, __LINE__,
|
||||
"_RWSTD_NO_EXT_NUM_GET not #defined");
|
||||
#endif
|
||||
|
||||
#if !defined (__GNUG__) || __GNUG__ > 2
|
||||
|
||||
# define STRING(x) #x
|
||||
# define TEST_GET(T) \
|
||||
do { \
|
||||
NumGet::iter_type in; \
|
||||
std::ios_base::iostate err = std::ios_base::failbit; \
|
||||
ellipsis_called = 0; \
|
||||
NumGet ().get (in, in, std::cin, err, convertible<T&>()); \
|
||||
rw_assert (1 == ellipsis_called, __FILE__, __LINE__, \
|
||||
"_RWSTD_NO_EXTENSIONS #defined and std::" \
|
||||
"num_get<char>::get(..., " STRING(T) ") found"); \
|
||||
} while (0)
|
||||
|
||||
TEST_GET (short);
|
||||
TEST_GET (int);
|
||||
|
||||
# ifdef _RWSTD_LONG_LONG
|
||||
|
||||
TEST_GET (_RWSTD_LONG_LONG);
|
||||
TEST_GET (unsigned _RWSTD_LONG_LONG);
|
||||
|
||||
# endif // _RWSTD_NO_LONG_LONG
|
||||
|
||||
#endif // gcc > 2.x
|
||||
|
||||
|
||||
// exercise _RWSTD_NO_EXT_FAILURE
|
||||
rw_info (0, 0, __LINE__, "_RWSTD_NO_EXT_FAILURE");
|
||||
|
||||
#ifndef _RWSTD_NO_EXT_FAILURE
|
||||
rw_assert (0, __FILE__, __LINE__, "_RWSTD_NO_EXT_FAILURE not #defined");
|
||||
#endif
|
||||
|
||||
rw_assert (IosBase::check_badbit (), __FILE__, __LINE__,
|
||||
"_RWSTD_NO_EXTENSIONS #defined and "
|
||||
" class std::ios_base::badbit_set found");
|
||||
|
||||
rw_assert (IosBase::check_eofbit (), __FILE__, __LINE__,
|
||||
"_RWSTD_NO_EXTENSIONS #defined and "
|
||||
" class std::ios_base::eofbit_set found");
|
||||
|
||||
rw_assert (IosBase::check_eofbit (), __FILE__, __LINE__,
|
||||
"_RWSTD_NO_EXTENSIONS #defined and "
|
||||
" class std::ios_base::failbit_set found");
|
||||
|
||||
|
||||
// exercise _RWSTD_NO_EXT_BIN_IO
|
||||
rw_info (0, 0, __LINE__, "_RWSTD_NO_EXT_BIN_IO");
|
||||
|
||||
#ifndef _RWSTD_NO_EXT_BIN_IO
|
||||
rw_assert (0, __FILE__, __LINE__,
|
||||
"_RWSTD_NO_EXT_BIN_IO not #defined");
|
||||
#endif
|
||||
|
||||
rw_assert (IosBase::check_bin (), __FILE__, __LINE__,
|
||||
"_RWSTD_NO_EXTENSIONS #defined and "
|
||||
" std::ios_base::bin found");
|
||||
|
||||
|
||||
// exercise _RWSTD_NO_EXT_REENTRANT_IO
|
||||
rw_info (0, 0, __LINE__, "_RWSTD_NO_EXT_REENTRANT_IO");
|
||||
|
||||
#ifndef _RWSTD_NO_EXT_REENTRANT_IO
|
||||
rw_assert (0, __FILE__, __LINE__,
|
||||
"_RWSTD_NO_EXT_REENTRANT_IO not #defined");
|
||||
#endif
|
||||
|
||||
rw_assert (IosBase::check_nolock (), __FILE__, __LINE__,
|
||||
"_RWSTD_NO_EXTENSIONS #defined and "
|
||||
" std::ios_base::nolock found");
|
||||
|
||||
rw_assert (IosBase::check_nolockbuf (), __FILE__, __LINE__,
|
||||
"_RWSTD_NO_EXTENSIONS #defined and "
|
||||
" std::ios_base::nolockbuf found");
|
||||
|
||||
|
||||
// exercise _RWSTD_NO_EXT_CHAR_TRAITS_PRIMARY
|
||||
rw_info (0, 0, __LINE__, "_RWSTD_NO_EXT_CHAR_TRAITS_PRIMARY");
|
||||
|
||||
#ifndef _RWSTD_NO_EXT_CHAR_TRAITS_PRIMARY
|
||||
rw_assert (0, __FILE__, __LINE__,
|
||||
"_RWSTD_NO_EXT_CHAR_TRAITS_PRIMARY not #defined");
|
||||
#endif // _RWSTD_NO_EXT_CHAR_TRAITS_PRIMARY
|
||||
|
||||
|
||||
// exercise _RWSTD_NO_EXT_CODECVT_PRIMARY
|
||||
rw_info (0, 0, __LINE__, "_RWSTD_NO_EXT_CODECVT_PRIMARY");
|
||||
|
||||
#ifndef _RWSTD_NO_EXT_CODECVT_PRIMARY
|
||||
rw_assert (0, __FILE__, __LINE__,
|
||||
"_RWSTD_NO_EXT_CODECVT_PRIMARY not #defined");
|
||||
#endif // _RWSTD_NO_EXT_CODECVT_PRIMARY
|
||||
|
||||
|
||||
// exercise _RWSTD_NO_EXT_COLLATE_PRIMARY
|
||||
rw_info (0, 0, __LINE__, "_RWSTD_NO_EXT_COLLATE_PRIMARY");
|
||||
|
||||
#ifndef _RWSTD_NO_EXT_COLLATE_PRIMARY
|
||||
rw_assert (0, __FILE__, __LINE__,
|
||||
"_RWSTD_NO_EXT_COLLATE_PRIMARY not #defined");
|
||||
#endif // _RWSTD_NO_EXT_COLLATE_PRIMARY
|
||||
|
||||
|
||||
// exercise _RWSTD_NO_EXT_CTYPE_PRIMARY
|
||||
rw_info (0, 0, __LINE__, "_RWSTD_NO_EXT_CTYPE_PRIMARY");
|
||||
|
||||
#ifndef _RWSTD_NO_EXT_CTYPE_PRIMARY
|
||||
rw_assert (0, __FILE__, __LINE__,
|
||||
"_RWSTD_NO_EXT_CTYPE_PRIMARY not #defined");
|
||||
#endif // _RWSTD_NO_EXT_CTYPE_PRIMARY
|
||||
|
||||
|
||||
// exercise _RWSTD_NO_EXT_MONEYPUNCT_PRIMARY
|
||||
rw_info (0, 0, __LINE__, "_RWSTD_NO_EXT_MONEYPUNCT_PRIMARY");
|
||||
|
||||
#ifndef _RWSTD_NO_EXT_MONEYPUNCT_PRIMARY
|
||||
rw_assert (0, __FILE__, __LINE__,
|
||||
"_RWSTD_NO_EXT_MONEYPUNCT_PRIMARY not #defined");
|
||||
#endif // _RWSTD_NO_EXT_MONEYPUNCT_PRIMARY
|
||||
|
||||
|
||||
// exercise _RWSTD_NO_EXT_NUMPUNCT_PRIMARY
|
||||
rw_info (0, 0, __LINE__, "_RWSTD_NO_EXT_NUMPUNCT_PRIMARY");
|
||||
|
||||
#ifndef _RWSTD_NO_EXT_NUMPUNCT_PRIMARY
|
||||
rw_assert (0, __FILE__, __LINE__,
|
||||
"_RWSTD_NO_EXT_NUMPUNCT_PRIMARY not #defined");
|
||||
#endif // _RWSTD_NO_EXT_NUMPUNCT_PRIMARY
|
||||
|
||||
|
||||
// exercise _RWSTD_NO_EXT_TIME_GET_PRIMARY
|
||||
rw_info (0, 0, __LINE__, "_RWSTD_NO_EXT_TIME_GET_PRIMARY");
|
||||
|
||||
#ifndef _RWSTD_NO_EXT_TIME_GET_PRIMARY
|
||||
rw_assert (0, __FILE__, __LINE__,
|
||||
"_RWSTD_NO_EXT_TIME_GET_PRIMARY not #defined");
|
||||
#endif // _RWSTD_NO_EXT_TIME_GET_PRIMARY
|
||||
|
||||
|
||||
// exercise _RWSTD_NO_EXT_TIME_PUT_PRIMARY
|
||||
rw_info (0, 0, __LINE__, "_RWSTD_NO_EXT_TIME_PUT_PRIMARY");
|
||||
|
||||
#ifndef _RWSTD_NO_EXT_TIME_PUT_PRIMARY
|
||||
rw_assert (0, __FILE__, __LINE__,
|
||||
"_RWSTD_NO_EXT_TIME_PUT_PRIMARY not #defined");
|
||||
#endif // _RWSTD_NO_EXT_TIME_PUT_PRIMARY
|
||||
|
||||
|
||||
// exercise _RWSTD_NO_EXT_MESSAGES_PRIMARY
|
||||
rw_info (0, 0, __LINE__, "_RWSTD_NO_EXT_MESSAGES_PRIMARY");
|
||||
|
||||
#ifndef _RWSTD_NO_EXT_MESSAGES_PRIMARY
|
||||
rw_assert (0, __FILE__, __LINE__,
|
||||
"_RWSTD_NO_EXT_MESSAGES_PRIMARY not #defined");
|
||||
#endif // _RWSTD_NO_EXT_MESSAGES_PRIMARY
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* extern */ int
|
||||
main (int argc, char* argv [])
|
||||
{
|
||||
return rw_test (argc, argv, __FILE__,
|
||||
"intro.compliance",
|
||||
0, // no comment
|
||||
run_test, "", 0);
|
||||
}
|
||||
|
||||
719
extern/stdcxx/4.2.1/tests/intro/17.names.cpp
vendored
Normal file
719
extern/stdcxx/4.2.1/tests/intro/17.names.cpp
vendored
Normal file
@@ -0,0 +1,719 @@
|
||||
/************************************************************************
|
||||
*
|
||||
* test_issue16717.cpp - regression test for Onyx issue #16717
|
||||
*
|
||||
* $Id: 17.names.cpp 594132 2007-11-12 13:49:37Z faridz $
|
||||
*
|
||||
************************************************************************
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed
|
||||
* with this work for additional information regarding copyright
|
||||
* ownership. The ASF licenses this file to you under the Apache
|
||||
* License, Version 2.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* permissions and limitations under the License.
|
||||
*
|
||||
* Copyright 2001-2006 Rogue Wave Software.
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
// ISSUE DESCRIPTION:
|
||||
// library headers must privatize all names other than those mandated
|
||||
// by the standard according to 17.4.3.1; this includes formal template
|
||||
// parameters and function arguments shown in the Standard
|
||||
// this test #defines the most common offenders and #includes all
|
||||
// library headers with the expectation that violations will be flagged
|
||||
// as compilation errors
|
||||
|
||||
#include <rw/_defs.h>
|
||||
#include <driver.h>
|
||||
|
||||
|
||||
#ifdef __SUNPRO_CC
|
||||
// included first to work around a SunPro 5.4 bug (PR #26255)
|
||||
# include <time.h>
|
||||
#endif // SunPro
|
||||
|
||||
// include ANSI C headers prior to attempting to induce errors in case
|
||||
// the C library itself contains violations of this rule
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
#include <float.h>
|
||||
|
||||
#ifndef _RWSTD_NO_ISO646_H
|
||||
# include <iso646.h>
|
||||
#endif
|
||||
|
||||
#include <limits.h>
|
||||
#include <locale.h>
|
||||
#include <math.h>
|
||||
#include <setjmp.h>
|
||||
#include <signal.h>
|
||||
#include <stdarg.h>
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
|
||||
#ifndef _RWSTD_NO_WCHAR_H
|
||||
# include <wchar.h>
|
||||
#endif
|
||||
|
||||
#ifndef _RWSTD_NO_WCTYPE_H
|
||||
# include <wctype.h>
|
||||
#endif
|
||||
|
||||
// include system headers included by the library
|
||||
#include <fcntl.h>
|
||||
|
||||
#if defined (_WIN32) || defined (_WIN64)
|
||||
# include <io.h>
|
||||
#else
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include _RWSTD_SYS_TYPES_H
|
||||
|
||||
#if defined (_RWSTD_SOLARIS_THREADS)
|
||||
# include <synch.h>
|
||||
# include <thread.h>
|
||||
#elif defined (_RWSTD_POSIX_THREADS)
|
||||
# include <pthread.h>
|
||||
#elif defined (_RWSTD_DCE_THREADS)
|
||||
# if defined (_RWSTD_NO_DCE_PTHREAD_H)
|
||||
# include <pthread.h>
|
||||
# else
|
||||
# include <dce/pthread.h>
|
||||
# endif
|
||||
#elif defined (_WIN32)
|
||||
# include <windows.h>
|
||||
# if defined (_MSC_VER) && 1400 <= _MSC_VER
|
||||
# include <intrin.h>
|
||||
# endif // 1400 <= _MSC_VER
|
||||
#endif
|
||||
|
||||
|
||||
// symbols typically used by programmers for local names
|
||||
#define a !ERROR!
|
||||
#define b !ERROR!
|
||||
#define c !ERROR!
|
||||
|
||||
#if !defined (__sgi)
|
||||
// a member of __huge_val in /usr/include/math.h and elsewhere
|
||||
# define d !ERROR!
|
||||
#endif
|
||||
|
||||
#define e !ERROR!
|
||||
#define f !ERROR!
|
||||
#define g !ERROR!
|
||||
|
||||
// gets expanded in macros within #include directives
|
||||
// during the second pass of the preprocessor...
|
||||
// #define h !ERROR!
|
||||
|
||||
#define i !ERROR!
|
||||
#define j !ERROR!
|
||||
#define k !ERROR!
|
||||
#define m !ERROR!
|
||||
#define n !ERROR!
|
||||
#define o !ERROR!
|
||||
#define p !ERROR!
|
||||
#define q !ERROR!
|
||||
#define r !ERROR!
|
||||
#define s !ERROR!
|
||||
#define t !ERROR!
|
||||
#define u !ERROR!
|
||||
#define v !ERROR!
|
||||
#define w !ERROR!
|
||||
#define x !ERROR!
|
||||
#define y !ERROR!
|
||||
#define z !ERROR!
|
||||
|
||||
#define A !ERROR!
|
||||
#define B !ERROR!
|
||||
#define C !ERROR!
|
||||
#define D !ERROR!
|
||||
#define E !ERROR!
|
||||
#define F !ERROR!
|
||||
#define G !ERROR!
|
||||
#define H !ERROR!
|
||||
#define I !ERROR!
|
||||
#define J !ERROR!
|
||||
#define K !ERROR!
|
||||
#define L !ERROR!
|
||||
#define M !ERROR!
|
||||
#define N !ERROR!
|
||||
#define O !ERROR!
|
||||
#define P !ERROR!
|
||||
#define Q !ERROR!
|
||||
#define R !ERROR!
|
||||
#define S !ERROR!
|
||||
#define T !ERROR!
|
||||
#define U !ERROR!
|
||||
#define V !ERROR!
|
||||
#define W !ERROR!
|
||||
#define X !ERROR!
|
||||
#define Y !ERROR!
|
||||
#define Z !ERROR!
|
||||
|
||||
// symbols typically used by programmers for names of class members
|
||||
#define a_ !ERROR!
|
||||
#define b_ !ERROR!
|
||||
#define c_ !ERROR!
|
||||
#define d_ !ERROR!
|
||||
#define e_ !ERROR!
|
||||
#define f_ !ERROR!
|
||||
#define g_ !ERROR!
|
||||
#define h_ !ERROR!
|
||||
#define i_ !ERROR!
|
||||
#define j_ !ERROR!
|
||||
#define k_ !ERROR!
|
||||
#define m_ !ERROR!
|
||||
#define n_ !ERROR!
|
||||
#define o_ !ERROR!
|
||||
#define p_ !ERROR!
|
||||
#define q_ !ERROR!
|
||||
#define r_ !ERROR!
|
||||
#define s_ !ERROR!
|
||||
#define t_ !ERROR!
|
||||
#define u_ !ERROR!
|
||||
#define v_ !ERROR!
|
||||
#define w_ !ERROR!
|
||||
#define x_ !ERROR!
|
||||
#define y_ !ERROR!
|
||||
#define z_ !ERROR!
|
||||
|
||||
#define A_ !ERROR!
|
||||
#define B_ !ERROR!
|
||||
#define C_ !ERROR!
|
||||
#define D_ !ERROR!
|
||||
#define E_ !ERROR!
|
||||
#define F_ !ERROR!
|
||||
#define G_ !ERROR!
|
||||
#define H_ !ERROR!
|
||||
#define I_ !ERROR!
|
||||
#define J_ !ERROR!
|
||||
#define K_ !ERROR!
|
||||
#define L_ !ERROR!
|
||||
#define M_ !ERROR!
|
||||
#define N_ !ERROR!
|
||||
#define O_ !ERROR!
|
||||
#define P_ !ERROR!
|
||||
#define Q_ !ERROR!
|
||||
#define R_ !ERROR!
|
||||
#define S_ !ERROR!
|
||||
#define T_ !ERROR!
|
||||
#define U_ !ERROR!
|
||||
#define V_ !ERROR!
|
||||
#define W_ !ERROR!
|
||||
#define X_ !ERROR!
|
||||
#define Y_ !ERROR!
|
||||
#define Z_ !ERROR!
|
||||
|
||||
#define a1 !ERROR!
|
||||
#define b1 !ERROR!
|
||||
#define c1 !ERROR!
|
||||
#define d1 !ERROR!
|
||||
#define e1 !ERROR!
|
||||
#define f1 !ERROR!
|
||||
#define g1 !ERROR!
|
||||
#define h1 !ERROR!
|
||||
#define i1 !ERROR!
|
||||
#define j1 !ERROR!
|
||||
#define k1 !ERROR!
|
||||
#define m1 !ERROR!
|
||||
#define n1 !ERROR!
|
||||
#define o1 !ERROR!
|
||||
#define p1 !ERROR!
|
||||
#define q1 !ERROR!
|
||||
#define r1 !ERROR!
|
||||
#define s1 !ERROR!
|
||||
#define t1 !ERROR!
|
||||
#define u1 !ERROR!
|
||||
#define v1 !ERROR!
|
||||
#define w1 !ERROR!
|
||||
#define x1 !ERROR!
|
||||
#define y1 !ERROR!
|
||||
#define z1 !ERROR!
|
||||
|
||||
#define a2 !ERROR!
|
||||
#define b2 !ERROR!
|
||||
#define c2 !ERROR!
|
||||
#define d2 !ERROR!
|
||||
#define e2 !ERROR!
|
||||
#define f2 !ERROR!
|
||||
#define g2 !ERROR!
|
||||
#define h2 !ERROR!
|
||||
#define i2 !ERROR!
|
||||
#define j2 !ERROR!
|
||||
#define k2 !ERROR!
|
||||
#define m2 !ERROR!
|
||||
#define n2 !ERROR!
|
||||
#define o2 !ERROR!
|
||||
#define p2 !ERROR!
|
||||
#define q2 !ERROR!
|
||||
#define r2 !ERROR!
|
||||
#define s2 !ERROR!
|
||||
#define t2 !ERROR!
|
||||
#define u2 !ERROR!
|
||||
#define v2 !ERROR!
|
||||
#define w2 !ERROR!
|
||||
#define x2 !ERROR!
|
||||
#define y2 !ERROR!
|
||||
#define z2 !ERROR!
|
||||
|
||||
#define A1 !ERROR!
|
||||
#define B1 !ERROR!
|
||||
#define C1 !ERROR!
|
||||
#define D1 !ERROR!
|
||||
#define E1 !ERROR!
|
||||
#define F1 !ERROR!
|
||||
#define G1 !ERROR!
|
||||
#define H1 !ERROR!
|
||||
#define I1 !ERROR!
|
||||
#define J1 !ERROR!
|
||||
#define K1 !ERROR!
|
||||
#define L1 !ERROR!
|
||||
#define M1 !ERROR!
|
||||
#define N1 !ERROR!
|
||||
#define O1 !ERROR!
|
||||
#define P1 !ERROR!
|
||||
#define Q1 !ERROR!
|
||||
#define R1 !ERROR!
|
||||
#define S1 !ERROR!
|
||||
#define T1 !ERROR!
|
||||
#define U1 !ERROR!
|
||||
#define V1 !ERROR!
|
||||
#define W1 !ERROR!
|
||||
#define X1 !ERROR!
|
||||
#define Y1 !ERROR!
|
||||
#define Z1 !ERROR!
|
||||
|
||||
#define A2 !ERROR!
|
||||
#define B2 !ERROR!
|
||||
#define C2 !ERROR!
|
||||
#define D2 !ERROR!
|
||||
#define E2 !ERROR!
|
||||
#define F2 !ERROR!
|
||||
#define G2 !ERROR!
|
||||
#define H2 !ERROR!
|
||||
#define I2 !ERROR!
|
||||
#define J2 !ERROR!
|
||||
#define K2 !ERROR!
|
||||
#define L2 !ERROR!
|
||||
#define M2 !ERROR!
|
||||
#define N2 !ERROR!
|
||||
#define O2 !ERROR!
|
||||
#define P2 !ERROR!
|
||||
#define Q2 !ERROR!
|
||||
#define R2 !ERROR!
|
||||
#define S2 !ERROR!
|
||||
#define T2 !ERROR!
|
||||
#define U2 !ERROR!
|
||||
#define V2 !ERROR!
|
||||
#define W2 !ERROR!
|
||||
#define X2 !ERROR!
|
||||
#define Y2 !ERROR!
|
||||
#define Z2 !ERROR!
|
||||
|
||||
// symbols beginning with __<N> where is a digit are reserved
|
||||
// by Sun dbx (see PR #30521)
|
||||
#define __2logN !ERROR!
|
||||
|
||||
// symbols reserved by gcc (run `strings cc1plus' from the shell)
|
||||
// see also http://gcc.gnu.org/libstdc++/17_intro/BADNAMES
|
||||
#define __aa !ERROR!
|
||||
#define __aad !ERROR!
|
||||
#define __ad !ERROR!
|
||||
#define __addr !ERROR!
|
||||
#define __adv !ERROR!
|
||||
#define __aer !ERROR!
|
||||
#define __als !ERROR!
|
||||
#define __alshift !ERROR!
|
||||
#define __amd !ERROR!
|
||||
#define __ami !ERROR!
|
||||
#define __aml !ERROR!
|
||||
#define __amu !ERROR!
|
||||
#define __aor !ERROR!
|
||||
#define __apl !ERROR!
|
||||
#define __array !ERROR!
|
||||
#define __ars !ERROR!
|
||||
#define __arshift !ERROR!
|
||||
#define __as !ERROR!
|
||||
#define __bit_and !ERROR!
|
||||
#define __bit_ior !ERROR!
|
||||
#define __bit_not !ERROR!
|
||||
#define __bit_xor !ERROR!
|
||||
#define __call !ERROR!
|
||||
#define __cl !ERROR!
|
||||
#define __cm !ERROR!
|
||||
#define __cn !ERROR!
|
||||
#define __co !ERROR!
|
||||
#define __component !ERROR!
|
||||
#define __compound !ERROR!
|
||||
#define __cond !ERROR!
|
||||
#define __convert !ERROR!
|
||||
#define __delete !ERROR!
|
||||
#define __dl !ERROR!
|
||||
#define __dv !ERROR!
|
||||
#define __eq !ERROR!
|
||||
#define __er !ERROR!
|
||||
#define __ge !ERROR!
|
||||
#define __gt !ERROR!
|
||||
#define __indirect !ERROR!
|
||||
#define __le !ERROR!
|
||||
#define __ls !ERROR!
|
||||
#define __lt !ERROR!
|
||||
|
||||
#ifndef _MSC_VER
|
||||
// MSVC's libc defines __max in <stdlib.h>
|
||||
# define __max !ERROR!
|
||||
#endif
|
||||
|
||||
#define __md !ERROR!
|
||||
#define __method_call !ERROR!
|
||||
#define __mi !ERROR!
|
||||
|
||||
#ifndef _MSC_VER
|
||||
// MSVC's libc defines __min in <stdlib.h>
|
||||
# define __min !ERROR!
|
||||
#endif
|
||||
|
||||
#define __minus !ERROR!
|
||||
#define __ml !ERROR!
|
||||
#define __mm !ERROR!
|
||||
#define __mn !ERROR!
|
||||
#define __mult !ERROR!
|
||||
#define __mx !ERROR!
|
||||
#define __ne !ERROR!
|
||||
#define __negate !ERROR!
|
||||
#define __new !ERROR!
|
||||
#define __nop !ERROR!
|
||||
#define __nt !ERROR!
|
||||
#define __nw !ERROR!
|
||||
#define __oo !ERROR!
|
||||
#define __op !ERROR!
|
||||
#define __or !ERROR!
|
||||
#define __pl !ERROR!
|
||||
#define __plus !ERROR!
|
||||
#define __postdecrement !ERROR!
|
||||
#define __postincrement !ERROR!
|
||||
#define __pp !ERROR!
|
||||
#define __pt !ERROR!
|
||||
#define __rf !ERROR!
|
||||
#define __rm !ERROR!
|
||||
#define __rs !ERROR!
|
||||
#define __sz !ERROR!
|
||||
#define __trunc_div !ERROR!
|
||||
#define __trunc_mod !ERROR!
|
||||
#define __truth_andif !ERROR!
|
||||
#define __truth_not !ERROR!
|
||||
#define __truth_orif !ERROR!
|
||||
// __value is reserved by MSVC 8.0
|
||||
#define __value !ERROR!
|
||||
#define __vc !ERROR!
|
||||
#define __vd !ERROR!
|
||||
#define __vn !ERROR!
|
||||
|
||||
// symbols reserved by the ARM compiler
|
||||
#if !defined (sun) && !defined (__sun) && !defined (__sun__)
|
||||
// MB_CUR_MAX expands to __ctype on SunOS
|
||||
# define __ctype !ERROR!
|
||||
#endif
|
||||
|
||||
#define __ct !ERROR!
|
||||
|
||||
// symbols typically used by C++ library implementations
|
||||
#define Alloc !ERROR!
|
||||
#define Allocator !ERROR!
|
||||
#define alloc !ERROR!
|
||||
#define Arg !ERROR!
|
||||
#define Arg1 !ERROR!
|
||||
#define Arg2 !ERROR!
|
||||
#define adr !ERROR!
|
||||
#define addr !ERROR!
|
||||
#define array !ERROR!
|
||||
#define BidirectionalIter !ERROR!
|
||||
#define BidirectionalIterator !ERROR!
|
||||
#define BinaryPred !ERROR!
|
||||
#define BinaryPredicate !ERROR!
|
||||
#define buf !ERROR!
|
||||
#define buffer !ERROR!
|
||||
#define CHAR !ERROR!
|
||||
#define Char !ERROR!
|
||||
#define charT !ERROR!
|
||||
#define CharT !ERROR!
|
||||
#define cmp !ERROR!
|
||||
#define cnt !ERROR!
|
||||
#define cpt !ERROR!
|
||||
#define comp !ERROR!
|
||||
#define Container !ERROR!
|
||||
#define Compare !ERROR!
|
||||
#define dist !ERROR!
|
||||
#define Dist !ERROR!
|
||||
#define Distance !ERROR!
|
||||
#define finish !ERROR!
|
||||
#define ForwardIter !ERROR!
|
||||
#define ForwardIterator !ERROR!
|
||||
#define found !ERROR!
|
||||
#define fun !ERROR!
|
||||
#define Function !ERROR!
|
||||
#define hint !ERROR!
|
||||
#define gen !ERROR!
|
||||
#define Gen !ERROR!
|
||||
#define Generator !ERROR!
|
||||
#define get_array !ERROR!
|
||||
#define get_slice !ERROR!
|
||||
#define gs !ERROR!
|
||||
#define InputIter !ERROR!
|
||||
#define InputIterator !ERROR!
|
||||
#define index !ERROR!
|
||||
#define INT !ERROR!
|
||||
#define inx !ERROR!
|
||||
#define ipfx !ERROR!
|
||||
#define istrm !ERROR!
|
||||
#define last !ERROR!
|
||||
#define len !ERROR!
|
||||
#define lhs !ERROR!
|
||||
#define line !ERROR!
|
||||
#define lineno !ERROR!
|
||||
#define loc !ERROR!
|
||||
#define LONG !ERROR!
|
||||
#define med !ERROR!
|
||||
#define mesg !ERROR!
|
||||
#define middle !ERROR!
|
||||
#define mode !ERROR!
|
||||
#define msg !ERROR!
|
||||
#define msk !ERROR!
|
||||
#define n !ERROR!
|
||||
#define nchar !ERROR!
|
||||
#define nchars !ERROR!
|
||||
#define neg !ERROR!
|
||||
#define negative !ERROR!
|
||||
#define num !ERROR!
|
||||
#define numb !ERROR!
|
||||
#define off !ERROR!
|
||||
#define offset !ERROR!
|
||||
#define old !ERROR!
|
||||
#define opfx !ERROR!
|
||||
#define os !ERROR!
|
||||
#define ostrm !ERROR!
|
||||
#define Operation !ERROR!
|
||||
#define OutputIter !ERROR!
|
||||
#define OutputIterator !ERROR!
|
||||
#define pf !ERROR!
|
||||
#define Pointer !ERROR!
|
||||
#define pos !ERROR!
|
||||
#define position !ERROR!
|
||||
#define positive !ERROR!
|
||||
#define Pred !ERROR!
|
||||
#define Predicate !ERROR!
|
||||
#define pend !ERROR!
|
||||
#define pending !ERROR!
|
||||
#define ptr !ERROR!
|
||||
#define quant !ERROR!
|
||||
#define RandomAccessIter !ERROR!
|
||||
#define RandomAccessIterator !ERROR!
|
||||
#define Reference !ERROR!
|
||||
#define Result !ERROR!
|
||||
#define res !ERROR!
|
||||
|
||||
// used by std::codecvt_base::result
|
||||
// #define result !ERROR!
|
||||
|
||||
#define rhs !ERROR!
|
||||
#define rlen !ERROR!
|
||||
#define save !ERROR!
|
||||
#define sec !ERROR!
|
||||
#define sl !ERROR!
|
||||
#define sla !ERROR!
|
||||
#define sb !ERROR!
|
||||
#define SCHAR !ERROR!
|
||||
#define Size !ERROR!
|
||||
#define slen !ERROR!
|
||||
#define smanip !ERROR!
|
||||
#define start !ERROR!
|
||||
#define stream !ERROR!
|
||||
#define strm !ERROR!
|
||||
#define sz !ERROR!
|
||||
#define tag !ERROR!
|
||||
#define temp !ERROR!
|
||||
#define tmp !ERROR!
|
||||
#define Tp !ERROR!
|
||||
#define traits !ERROR!
|
||||
#define Traits !ERROR!
|
||||
#define type !ERROR!
|
||||
#define Type !ERROR!
|
||||
#define UCHAR !ERROR!
|
||||
#define UINT !ERROR!
|
||||
#define ULONG !ERROR!
|
||||
#define ULLONG !ERROR!
|
||||
#define USHRT !ERROR!
|
||||
#define UnaryFunction !ERROR!
|
||||
#define val !ERROR!
|
||||
// value used in type traits
|
||||
// #define value !ERROR!
|
||||
#define var !ERROR!
|
||||
#define way !ERROR!
|
||||
#define which !ERROR!
|
||||
#define xpos !ERROR!
|
||||
|
||||
// verify that the library gracefully handles
|
||||
// the frequently #defined function macros
|
||||
#undef max
|
||||
#define max() !ERROR!
|
||||
#undef min
|
||||
#define min() !ERROR!
|
||||
|
||||
// symbols the DEC cxx compiler/linker/debugger use internally
|
||||
#define __INTER__ !ERROR!
|
||||
#define __bptr !ERROR!
|
||||
#define __control !ERROR!
|
||||
#define __vptr !ERROR!
|
||||
#define __result_pointer !ERROR!
|
||||
#define __result !ERROR!
|
||||
#define __vtbl !ERROR!
|
||||
#define __btbl !ERROR!
|
||||
#define evdw !ERROR!
|
||||
#define __external_destructor_functor_list !ERROR!
|
||||
#define __fn !ERROR!
|
||||
#define __fw !ERROR!
|
||||
#define __init !ERROR!
|
||||
#define __fini !ERROR!
|
||||
|
||||
|
||||
#include <algorithm>
|
||||
#include <bitset>
|
||||
#include <complex>
|
||||
#include <deque>
|
||||
#include <exception>
|
||||
#include <fstream>
|
||||
#include <functional>
|
||||
#include <iomanip>
|
||||
#include <ios>
|
||||
#include <iosfwd>
|
||||
#include <iostream>
|
||||
#include <istream>
|
||||
#include <iterator>
|
||||
#include <limits>
|
||||
#include <list>
|
||||
|
||||
#include <locale>
|
||||
|
||||
// assume <map> isn't #included by any other public header
|
||||
#undef comp
|
||||
#include <map>
|
||||
#define comp !ERROR!
|
||||
|
||||
#include <memory>
|
||||
#include <new>
|
||||
#include <numeric>
|
||||
#include <ostream>
|
||||
|
||||
// assume <queue> isn't #included by any other public header
|
||||
// `c' and `comp' mandated by the standard
|
||||
#undef c
|
||||
#undef comp
|
||||
#include <queue>
|
||||
#define c !ERROR!
|
||||
#define comp !ERROR!
|
||||
|
||||
// assume <set> isn't #included by any other public header
|
||||
// `comp' mandated by the standard
|
||||
#undef comp
|
||||
#include <set>
|
||||
#define comp !ERROR!
|
||||
#include <sstream>
|
||||
|
||||
// assume <stack> isn't #included by any other public header
|
||||
// `c' mandated by the standard
|
||||
#undef c
|
||||
#include <stack>
|
||||
#define c !ERROR!
|
||||
|
||||
#include <stdexcept>
|
||||
#include <streambuf>
|
||||
#include <string>
|
||||
|
||||
#if defined (__SUNPRO_CC) && __SUNPRO_CC <= 0x530
|
||||
// working around a SunPro 5.3 bug (see PR #26025)
|
||||
# undef rhs
|
||||
#endif // SunPro > 5.3
|
||||
|
||||
#include <typeinfo>
|
||||
|
||||
#define rhs !ERROR!
|
||||
|
||||
#include <utility>
|
||||
|
||||
// assume <valarray> isn't #included by any other public header
|
||||
// `start' mandated by the standard
|
||||
#undef start
|
||||
#include <valarray>
|
||||
#define start !ERROR!
|
||||
#include <vector>
|
||||
|
||||
#ifndef _RWSTD_NO_NEW_HEADER
|
||||
|
||||
#include <cassert>
|
||||
#include <cctype>
|
||||
#include <cerrno>
|
||||
#include <cfloat>
|
||||
|
||||
#ifndef _RWSTD_NO_ISO646_H
|
||||
# include <ciso646>
|
||||
#endif
|
||||
|
||||
#include <climits>
|
||||
#include <clocale>
|
||||
#include <cmath>
|
||||
#include <csetjmp>
|
||||
#include <csignal>
|
||||
#include <cstdarg>
|
||||
#include <cstddef>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <ctime>
|
||||
|
||||
|
||||
#ifndef _RWSTD_NO_WCHAR_H
|
||||
# include <cwchar>
|
||||
#endif
|
||||
|
||||
#ifndef _RWSTD_NO_WCTYPE_H
|
||||
# include <cwctype>
|
||||
#endif
|
||||
|
||||
#endif // _RWSTD_NO_NEW_HEADER
|
||||
|
||||
/***********************************************************************/
|
||||
|
||||
static int
|
||||
run_test (int, char**)
|
||||
{
|
||||
// no-op (compile-only test)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/***********************************************************************/
|
||||
|
||||
int main (int argc, char** argv)
|
||||
{
|
||||
return rw_test (argc, argv, __FILE__,
|
||||
"lib.intro",
|
||||
"checking for namespace pollution",
|
||||
run_test,
|
||||
0, 0);
|
||||
}
|
||||
Reference in New Issue
Block a user