diff options
author | Paolo Carlini <pcarlini@suse.de> | 2005-03-07 22:22:35 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2005-03-07 22:22:35 +0000 |
commit | cff001b2e843de422ba2a67b9049b558709a91dd (patch) | |
tree | d6a10c9c6721acbf04fa940ca023eb13726a902a /libstdc++-v3 | |
parent | 92db3ec9db394735d4c11d477ab29d363243f151 (diff) | |
download | gcc-cff001b2e843de422ba2a67b9049b558709a91dd.zip gcc-cff001b2e843de422ba2a67b9049b558709a91dd.tar.gz gcc-cff001b2e843de422ba2a67b9049b558709a91dd.tar.bz2 |
type_traits (is_polymorphic): Don't forget the virtual destructor, thus avoiding warnings.
2005-03-07 Paolo Carlini <pcarlini@suse.de>
* include/tr1/type_traits (is_polymorphic): Don't forget
the virtual destructor, thus avoiding warnings.
* testsuite/testsuite_tr1.h (class AbstractClass,
class PolymorphicClass): Likewise.
2005-03-07 Paolo Carlini <pcarlini@suse.de>
* include/std/std_complex.h (pow(const complex<_Tp>&,
const complex<_Tp>&)): Dispatch to either __complex_pow(__x.__rep(),
__y.__rep()) or __complex_pow(__x, __y) depending on the macro
_GLIBCXX_USE_C99_COMPLEX.
From-SVN: r96048
Diffstat (limited to 'libstdc++-v3')
-rw-r--r-- | libstdc++-v3/ChangeLog | 14 | ||||
-rw-r--r-- | libstdc++-v3/include/std/std_complex.h | 10 | ||||
-rw-r--r-- | libstdc++-v3/include/tr1/type_traits | 7 | ||||
-rw-r--r-- | libstdc++-v3/testsuite/testsuite_tr1.h | 10 |
4 files changed, 35 insertions, 6 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index a11e34f..48e5451 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,19 @@ 2005-03-07 Paolo Carlini <pcarlini@suse.de> + * include/tr1/type_traits (is_polymorphic): Don't forget + the virtual destructor, thus avoiding warnings. + * testsuite/testsuite_tr1.h (class AbstractClass, + class PolymorphicClass): Likewise. + +2005-03-07 Paolo Carlini <pcarlini@suse.de> + + * include/std/std_complex.h (pow(const complex<_Tp>&, + const complex<_Tp>&)): Dispatch to either __complex_pow(__x.__rep(), + __y.__rep()) or __complex_pow(__x, __y) depending on the macro + _GLIBCXX_USE_C99_COMPLEX. + +2005-03-07 Paolo Carlini <pcarlini@suse.de> + * include/std/std_fstream.h (basic_fstream<>::open, basic_ifstream<>::open, basic_ofstream<>::open): Implement the resolution of DR 409 [Ready], call clear() on success. diff --git a/libstdc++-v3/include/std/std_complex.h b/libstdc++-v3/include/std/std_complex.h index fb8122c..694acdc 100644 --- a/libstdc++-v3/include/std/std_complex.h +++ b/libstdc++-v3/include/std/std_complex.h @@ -966,14 +966,20 @@ namespace std { return __builtin_cpow(__x, __y); } inline __complex__ long double - __complex_pow(__complex__ long double& __x, __complex__ long double& __y) + __complex_pow(const __complex__ long double& __x, + const __complex__ long double& __y) { return __builtin_cpowl(__x, __y); } -#endif template<typename _Tp> inline complex<_Tp> pow(const complex<_Tp>& __x, const complex<_Tp>& __y) + { return __complex_pow(__x.__rep(), __y.__rep()); } +#else + template<typename _Tp> + inline complex<_Tp> + pow(const complex<_Tp>& __x, const complex<_Tp>& __y) { return __complex_pow(__x, __y); } +#endif template<typename _Tp> inline complex<_Tp> diff --git a/libstdc++-v3/include/tr1/type_traits b/libstdc++-v3/include/tr1/type_traits index afdea0c..55f585f 100644 --- a/libstdc++-v3/include/tr1/type_traits +++ b/libstdc++-v3/include/tr1/type_traits @@ -319,8 +319,11 @@ namespace tr1 template<typename _Up> struct __second : public _Up - { virtual void __dummy(); }; - + { + virtual void __dummy(); + virtual ~__second(); + }; + public: static const bool __value = sizeof(__first<_Tp>) == sizeof(__second<_Tp>); }; diff --git a/libstdc++-v3/testsuite/testsuite_tr1.h b/libstdc++-v3/testsuite/testsuite_tr1.h index cb93225..fa514ca 100644 --- a/libstdc++-v3/testsuite/testsuite_tr1.h +++ b/libstdc++-v3/testsuite/testsuite_tr1.h @@ -121,10 +121,16 @@ namespace __gnu_test { operator int() const; }; class AbstractClass - { virtual void rotate(int) = 0; }; + { + virtual void rotate(int) = 0; + virtual ~AbstractClass(); + }; class PolymorphicClass - { virtual void rotate(int); }; + { + virtual void rotate(int); + virtual ~PolymorphicClass(); + }; class DerivedPolymorphic : public PolymorphicClass { }; |