From: Jonathan Wakely Date: Mon, 16 Jul 2012 20:43:11 +0000 (+0000) Subject: re PR libstdc++/53978 (Missing static const definitions in ) X-Git-Tag: releases/gcc-4.8.0~4454 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8db81fb2feeb722b0b49db4750e58fc1ecd05bff;p=thirdparty%2Fgcc.git re PR libstdc++/53978 (Missing static const definitions in ) PR libstdc++/53978 * include/bits/alloc_traits.h (allocator_traits): Define static constants. * include/bits/ptr_traits.h (pointer_traits): Likewise. * include/ext/alloc_traits.h (__allocator_always_compares_equal): Likewise. From-SVN: r189547 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index a19f33c48825..e1f8bd9bebd1 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,12 @@ +2012-07-16 Jonathan Wakely + + PR libstdc++/53978 + * include/bits/alloc_traits.h (allocator_traits): Define static + constants. + * include/bits/ptr_traits.h (pointer_traits): Likewise. + * include/ext/alloc_traits.h (__allocator_always_compares_equal): + Likewise. + 2012-07-13 Paolo Carlini PR libstdc++/53657 diff --git a/libstdc++-v3/include/bits/alloc_traits.h b/libstdc++-v3/include/bits/alloc_traits.h index e1f4d41a6d0e..80cc956a6fbf 100644 --- a/libstdc++-v3/include/bits/alloc_traits.h +++ b/libstdc++-v3/include/bits/alloc_traits.h @@ -1,6 +1,6 @@ // Allocator traits -*- C++ -*- -// Copyright (C) 2011 Free Software Foundation, Inc. +// Copyright (C) 2011-2012 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 @@ -56,6 +56,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION static const bool __value = _S_chk<_Alloc, _Tp>(nullptr); }; + template + const bool __alloctr_rebind_helper<_Alloc, _Tp>::__value; + template::__value> struct __alloctr_rebind; @@ -422,6 +425,27 @@ _GLIBCXX_ALLOC_TR_NESTED_TYPE(propagate_on_container_swap, { return _S_select(__rhs); } }; + template + template + const bool allocator_traits<_Alloc>::__allocate_helper<_Alloc2>::value; + + template + template + const bool + allocator_traits<_Alloc>::__construct_helper<_Tp, _Args...>::value; + + template + template + const bool allocator_traits<_Alloc>::__destroy_helper<_Tp>::value; + + template + template + const bool allocator_traits<_Alloc>::__maxsize_helper<_Alloc2>::value; + + template + template + const bool allocator_traits<_Alloc>::__select_helper<_Alloc2>::value; + template inline void __do_alloc_on_copy(_Alloc& __one, const _Alloc& __two, true_type) diff --git a/libstdc++-v3/include/bits/ptr_traits.h b/libstdc++-v3/include/bits/ptr_traits.h index bba9b49bfc6c..552f48745f33 100644 --- a/libstdc++-v3/include/bits/ptr_traits.h +++ b/libstdc++-v3/include/bits/ptr_traits.h @@ -1,6 +1,6 @@ // Pointer Traits -*- C++ -*- -// Copyright (C) 2011 Free Software Foundation, Inc. +// Copyright (C) 2011-2012 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 @@ -86,6 +86,9 @@ _GLIBCXX_HAS_NESTED_TYPE(difference_type) static const bool __value = _S_chk<_Ptr, _Up>(nullptr); }; + template + const bool __ptrtr_rebind_helper<_Ptr, _Up>::__value; + template::__value> struct __ptrtr_rebind; diff --git a/libstdc++-v3/include/ext/alloc_traits.h b/libstdc++-v3/include/ext/alloc_traits.h index b3e3af663a62..b66f818a37a5 100644 --- a/libstdc++-v3/include/ext/alloc_traits.h +++ b/libstdc++-v3/include/ext/alloc_traits.h @@ -1,6 +1,6 @@ // Allocator traits -*- C++ -*- -// Copyright (C) 2011 Free Software Foundation, Inc. +// Copyright (C) 2011-2012 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 @@ -49,37 +49,56 @@ namespace __gnu_cxx _GLIBCXX_VISIBILITY(default) _GLIBCXX_BEGIN_NAMESPACE_VERSION #ifdef __GXX_EXPERIMENTAL_CXX0X__ -template - struct __allocator_always_compares_equal - { static const bool value = false; }; + template + struct __allocator_always_compares_equal + { static const bool value = false; }; + + template + const bool __allocator_always_compares_equal<_Alloc>::value; template struct __allocator_always_compares_equal> { static const bool value = true; }; + template + const bool __allocator_always_compares_equal>::value; + template struct array_allocator; template struct __allocator_always_compares_equal> { static const bool value = true; }; + template + const bool + __allocator_always_compares_equal>::value; + template struct mt_allocator; template struct __allocator_always_compares_equal> { static const bool value = true; }; + template + const bool __allocator_always_compares_equal>::value; + template struct new_allocator; template struct __allocator_always_compares_equal> { static const bool value = true; }; + template + const bool __allocator_always_compares_equal>::value; + template struct pool_allocator; template struct __allocator_always_compares_equal> { static const bool value = true; }; + + template + const bool __allocator_always_compares_equal>::value; #endif /**