user.cfg.in: Remove tr1_impl headers.
2010-11-05 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/user.cfg.in: Remove tr1_impl headers. * testsuite/tr1/4_metaprogramming/integral_constant/requirements/ constexpr_data.cc: New. * testsuite/util/testsuite_tr1.h (LType, LTypeDerived, NLType): New. * testsuite/20_util/is_literal_type/value.cc: New. * testsuite/20_util/is_literal_type/requirements/typedefs.cc: Name. * testsuite/20_util/is_literal_type/requirements/ explicit_instantiation.cc: New. From-SVN: r166381
This commit is contained in:
parent
8d598c7441
commit
f706cf1831
|
@ -1,3 +1,16 @@
|
|||
2010-11-05 Benjamin Kosnik <bkoz@redhat.com>
|
||||
|
||||
* doc/doxygen/user.cfg.in: Remove tr1_impl headers.
|
||||
|
||||
* testsuite/tr1/4_metaprogramming/integral_constant/requirements/
|
||||
constexpr_data.cc: New.
|
||||
|
||||
* testsuite/util/testsuite_tr1.h (LType, LTypeDerived, NLType): New.
|
||||
* testsuite/20_util/is_literal_type/value.cc: New.
|
||||
* testsuite/20_util/is_literal_type/requirements/typedefs.cc: Name.
|
||||
* testsuite/20_util/is_literal_type/requirements/
|
||||
explicit_instantiation.cc: New.
|
||||
|
||||
2010-11-04 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
PR libstdc++/46303
|
||||
|
|
|
@ -586,6 +586,7 @@ INPUT = @srcdir@/doc/doxygen/doxygroups.cc \
|
|||
@srcdir@/libsupc++/cxxabi.h \
|
||||
@srcdir@/libsupc++/cxxabi-forced.h \
|
||||
@srcdir@/libsupc++/exception \
|
||||
@srcdir@/libsupc++/exception_defines.h \
|
||||
@srcdir@/libsupc++/exception_ptr.h \
|
||||
@srcdir@/libsupc++/initializer_list \
|
||||
@srcdir@/libsupc++/nested_exception.h \
|
||||
|
@ -665,6 +666,7 @@ INPUT = @srcdir@/doc/doxygen/doxygroups.cc \
|
|||
include/backward/strstream \
|
||||
include/debug/bitset \
|
||||
include/debug/deque \
|
||||
include/debug/forward_list \
|
||||
include/debug/list \
|
||||
include/debug/map \
|
||||
include/debug/set \
|
||||
|
@ -674,6 +676,7 @@ INPUT = @srcdir@/doc/doxygen/doxygroups.cc \
|
|||
include/debug/vector \
|
||||
include/profile/bitset \
|
||||
include/profile/deque \
|
||||
include/profile/forward_list \
|
||||
include/profile/list \
|
||||
include/profile/map \
|
||||
include/profile/set \
|
||||
|
@ -707,20 +710,6 @@ INPUT = @srcdir@/doc/doxygen/doxygroups.cc \
|
|||
include/tr1/ctime \
|
||||
include/tr1/cwchar \
|
||||
include/tr1/cwctype \
|
||||
include/tr1_impl/array \
|
||||
include/tr1_impl/cctype \
|
||||
include/tr1_impl/cfenv \
|
||||
include/tr1_impl/cinttypes \
|
||||
include/tr1_impl/cmath \
|
||||
include/tr1_impl/complex \
|
||||
include/tr1_impl/cstdint \
|
||||
include/tr1_impl/cstdio \
|
||||
include/tr1_impl/cstdlib \
|
||||
include/tr1_impl/cwchar \
|
||||
include/tr1_impl/cwctype \
|
||||
include/tr1_impl/type_traits \
|
||||
include/tr1_impl/utility \
|
||||
include/tr1_impl \
|
||||
include/decimal/decimal \
|
||||
include/ \
|
||||
include/@host_alias@/bits \
|
||||
|
@ -728,6 +717,7 @@ INPUT = @srcdir@/doc/doxygen/doxygroups.cc \
|
|||
include/bits \
|
||||
include/debug \
|
||||
include/parallel \
|
||||
include/precompiled \
|
||||
include/profile \
|
||||
include/profile/impl \
|
||||
include/ext \
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
// { dg-options "-std=gnu++0x" }
|
||||
// { dg-do compile }
|
||||
// 2010-02-21 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
// Copyright (C) 2010 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the
|
||||
// terms of the GNU General Public License as published by the
|
||||
// Free Software Foundation; either version 3, or (at your option)
|
||||
// any later version.
|
||||
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License along
|
||||
// with this library; see the file COPYING3. If not see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
// NB: This file is for testing type_traits with NO OTHER INCLUDES.
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
namespace std
|
||||
{
|
||||
typedef short test_type;
|
||||
template struct is_literal_type<test_type>;
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
// { dg-options "-std=gnu++0x" }
|
||||
// 2010-02-21 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
//
|
||||
// Copyright (C) 2010 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the
|
||||
// terms of the GNU General Public License as published by the
|
||||
// Free Software Foundation; either version 3, or (at your option)
|
||||
// any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License along
|
||||
// with this library; see the file COPYING3. If not see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
//
|
||||
// NB: This file is for testing type_traits with NO OTHER INCLUDES.
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
// { dg-do compile }
|
||||
|
||||
void test01()
|
||||
{
|
||||
// Check for required typedefs
|
||||
typedef std::is_literal_type<int> test_type;
|
||||
typedef test_type::value_type value_type;
|
||||
typedef test_type::type type;
|
||||
typedef test_type::type::value_type type_value_type;
|
||||
typedef test_type::type::type type_type;
|
||||
}
|
|
@ -0,0 +1,54 @@
|
|||
// { dg-options "-std=gnu++0x" }
|
||||
// 2010-03-23 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
//
|
||||
// Copyright (C) 2010 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the
|
||||
// terms of the GNU General Public License as published by the
|
||||
// Free Software Foundation; either version 3, or (at your option)
|
||||
// any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License along
|
||||
// with this library; see the file COPYING3. If not see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include <type_traits>
|
||||
#include <testsuite_hooks.h>
|
||||
#include <testsuite_tr1.h>
|
||||
|
||||
void test01()
|
||||
{
|
||||
bool test __attribute__((unused)) = true;
|
||||
using std::is_literal_type;
|
||||
using namespace __gnu_test;
|
||||
|
||||
VERIFY( (test_category<is_literal_type, int>(true)) );
|
||||
VERIFY( (test_category<is_literal_type, unsigned char>(true)) );
|
||||
|
||||
VERIFY( (test_category<is_literal_type, TType>(true)) );
|
||||
VERIFY( (test_category<is_literal_type, PODType>(true)) );
|
||||
|
||||
VERIFY( (test_category<is_literal_type, NType>(false)) );
|
||||
VERIFY( (test_category<is_literal_type, SLType>(false)) );
|
||||
|
||||
VERIFY( (test_category<is_literal_type, LType>(true)) );
|
||||
VERIFY( (test_category<is_literal_type, LType[5]>(true)) );
|
||||
|
||||
VERIFY( (test_category<is_literal_type, NLType>(false)) );
|
||||
VERIFY( (test_category<is_literal_type, NLType[5]>(false)) );
|
||||
|
||||
VERIFY( (test_category<is_literal_type, LTypeDerived>(true)) );
|
||||
VERIFY( (test_category<is_literal_type, LTypeDerived[5]>(true)) );
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
test01();
|
||||
return 0;
|
||||
}
|
|
@ -0,0 +1,52 @@
|
|||
// { dg-do compile }
|
||||
// { dg-options "-std=gnu++0x" }
|
||||
|
||||
// Copyright (C) 2010 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the
|
||||
// terms of the GNU General Public License as published by the
|
||||
// Free Software Foundation; either version 3, or (at your option)
|
||||
// any later version.
|
||||
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License along
|
||||
// with this library; see the file COPYING3. If not see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include <type_traits>
|
||||
#include <testsuite_common_types.h>
|
||||
|
||||
namespace __gnu_test
|
||||
{
|
||||
struct constexpr_member_data
|
||||
{
|
||||
template<typename _Ttesttype>
|
||||
void
|
||||
operator()()
|
||||
{
|
||||
struct _Concept
|
||||
{
|
||||
void __constraint()
|
||||
{
|
||||
constexpr auto v __attribute__((unused)) (_Ttesttype::value);
|
||||
}
|
||||
};
|
||||
|
||||
_Concept c;
|
||||
c.__constraint();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
__gnu_test::constexpr_member_data test;
|
||||
test.operator()<std::integral_constant<unsigned short, 69>>();
|
||||
test.operator()<std::integral_constant<bool, true>>();
|
||||
return 0;
|
||||
}
|
|
@ -57,7 +57,7 @@ namespace __gnu_test
|
|||
// For testing tr1/type_traits/extent, which has a second template
|
||||
// parameter.
|
||||
template<template<typename, unsigned> class Property,
|
||||
typename Type, unsigned Uint>
|
||||
typename Type, unsigned Uint>
|
||||
bool
|
||||
test_property(typename Property<Type, Uint>::value_type value)
|
||||
{
|
||||
|
@ -80,7 +80,7 @@ namespace __gnu_test
|
|||
#endif
|
||||
|
||||
template<template<typename, typename> class Relationship,
|
||||
typename Type1, typename Type2>
|
||||
typename Type1, typename Type2>
|
||||
bool
|
||||
test_relationship(bool value)
|
||||
{
|
||||
|
@ -188,6 +188,33 @@ namespace __gnu_test
|
|||
int j;
|
||||
};
|
||||
|
||||
#ifdef __GXX_EXPERIMENTAL_CXX0X__
|
||||
struct LType // literal type
|
||||
{
|
||||
int _M_i;
|
||||
|
||||
constexpr LType(int __i) : _M_i(__i) { }
|
||||
};
|
||||
|
||||
struct LTypeDerived : public LType
|
||||
{
|
||||
constexpr LTypeDerived(int __i) : LType(__i) { }
|
||||
};
|
||||
|
||||
struct NLType // not literal type
|
||||
{
|
||||
int _M_i;
|
||||
|
||||
NLType() : _M_i(0) { }
|
||||
|
||||
constexpr NLType(int __i) : _M_i(__i) { }
|
||||
|
||||
NLType(const NLType& __other) : _M_i(__other._M_i) { }
|
||||
|
||||
~NLType() { _M_i = 0; }
|
||||
};
|
||||
#endif
|
||||
|
||||
int truncate_float(float x) { return (int)x; }
|
||||
long truncate_double(double x) { return (long)x; }
|
||||
|
||||
|
@ -251,7 +278,7 @@ namespace __gnu_test
|
|||
|
||||
// For use in 8_c_compatibility.
|
||||
template<typename R, typename T>
|
||||
typename __gnu_cxx::__enable_if<std::__are_same<R, T>::__value,
|
||||
typename __gnu_cxx::__enable_if<std::__are_same<R, T>::__value,
|
||||
bool>::__type
|
||||
check_ret_type(T)
|
||||
{ return true; }
|
||||
|
|
Loading…
Reference in New Issue