Commit d81db5b0 by Paolo Carlini Committed by Paolo Carlini

cmath: Include <bits/stl_algobase.h> instead of the whole <algorithm>.

2007-04-10  Paolo Carlini  <pcarlini@suse.de>

	* include/tr1/cmath: Include <bits/stl_algobase.h> instead of
	the whole <algorithm>.

From-SVN: r123696
parent 05beb8e7
2007-04-10 Paolo Carlini <pcarlini@suse.de> 2007-04-10 Paolo Carlini <pcarlini@suse.de>
* include/tr1/cmath: Include <bits/stl_algobase.h> instead of
the whole <algorithm>.
2007-04-10 Paolo Carlini <pcarlini@suse.de>
* include/tr1/type_traits (__is_function_helper): New, uses * include/tr1/type_traits (__is_function_helper): New, uses
variadic templates. variadic templates.
(is_function): Forward to the latter. (is_function): Forward to the latter.
......
// TR1 cmath -*- C++ -*- // TR1 cmath -*- C++ -*-
// Copyright (C) 2006-2007 Free Software Foundation, Inc. // Copyright (C) 2006, 2007 Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
#define _TR1_CMATH 1 #define _TR1_CMATH 1
#include <bits/c++config.h> #include <bits/c++config.h>
#include <algorithm> #include <bits/stl_algobase.h>
#include <cmath> #include <cmath>
#include <tr1/common.h> #include <tr1/common.h>
...@@ -375,11 +375,12 @@ _GLIBCXX_BEGIN_NAMESPACE(_GLIBCXX_TR1) ...@@ -375,11 +375,12 @@ _GLIBCXX_BEGIN_NAMESPACE(_GLIBCXX_TR1)
inline typename inline typename
__gnu_cxx::__enable_if<std::__is_floating<_Tp>::__value __gnu_cxx::__enable_if<std::__is_floating<_Tp>::__value
|| std::__is_floating<_Up>::__value, || std::__is_floating<_Up>::__value,
typename typename std::_GLIBCXX_TR1::
std::_GLIBCXX_TR1::__promote_2<_Tp, _Up>::__type>::__type __promote_2<_Tp, _Up>::__type>::__type
atan2(_Tp __y, _Up __x) atan2(_Tp __y, _Up __x)
{ {
typedef typename std::_GLIBCXX_TR1::__promote_2<_Tp, _Up>::__type __type; typedef typename std::_GLIBCXX_TR1::__promote_2<_Tp, _Up>::__type
__type;
return std::atan2(__type(__y), __type(__x)); return std::atan2(__type(__y), __type(__x));
} }
} // namespace __detail } // namespace __detail
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment