aboutsummaryrefslogtreecommitdiff
path: root/include/chrono
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-01-06 20:13:54 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-01-06 20:13:54 +0000
commit4a2db4d30e1653093d4d8b06e8221e2f8b723507 (patch)
tree941a9d805eb2afbba58f445381819ba0e1dc355f /include/chrono
parentcb08bb04c85c6dcd3d951725505317c31eeff323 (diff)
downloadsrc-4a2db4d30e1653093d4d8b06e8221e2f8b723507.tar.gz
src-4a2db4d30e1653093d4d8b06e8221e2f8b723507.zip
Vendor import of libc++ trunk r291274:vendor/libc++/libc++-trunk-r291274
Notes
Notes: svn path=/vendor/libc++/dist/; revision=311538 svn path=/vendor/libc++/libc++-trunk-r291274/; revision=311539; tag=vendor/libc++/libc++-trunk-r291274
Diffstat (limited to 'include/chrono')
-rw-r--r--include/chrono46
1 files changed, 23 insertions, 23 deletions
diff --git a/include/chrono b/include/chrono
index 74e359c58dc2..4e82ef2b5f46 100644
--- a/include/chrono
+++ b/include/chrono
@@ -77,13 +77,13 @@ public:
constexpr duration operator+() const;
constexpr duration operator-() const;
- duration& operator++();
- duration operator++(int);
- duration& operator--();
- duration operator--(int);
+ constexpr duration& operator++();
+ constexpr duration operator++(int);
+ constexpr duration& operator--();
+ constexpr duration operator--(int);
- duration& operator+=(const duration& d);
- duration& operator-=(const duration& d);
+ constexpr duration& operator+=(const duration& d);
+ constexpr duration& operator-=(const duration& d);
duration& operator*=(const rep& rhs);
duration& operator/=(const rep& rhs);
@@ -316,7 +316,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
namespace chrono
{
-template <class _Rep, class _Period = ratio<1> > class _LIBCPP_TYPE_VIS_ONLY duration;
+template <class _Rep, class _Period = ratio<1> > class _LIBCPP_TEMPLATE_VIS duration;
template <class _Tp>
struct __is_duration : false_type {};
@@ -336,7 +336,7 @@ struct __is_duration<const volatile duration<_Rep, _Period> > : true_type {};
} // chrono
template <class _Rep1, class _Period1, class _Rep2, class _Period2>
-struct _LIBCPP_TYPE_VIS_ONLY common_type<chrono::duration<_Rep1, _Period1>,
+struct _LIBCPP_TEMPLATE_VIS common_type<chrono::duration<_Rep1, _Period1>,
chrono::duration<_Rep2, _Period2> >
{
typedef chrono::duration<typename common_type<_Rep1, _Rep2>::type,
@@ -414,7 +414,7 @@ duration_cast(const duration<_Rep, _Period>& __fd)
}
template <class _Rep>
-struct _LIBCPP_TYPE_VIS_ONLY treat_as_floating_point : is_floating_point<_Rep> {};
+struct _LIBCPP_TEMPLATE_VIS treat_as_floating_point : is_floating_point<_Rep> {};
#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES)
template <class _Rep> _LIBCPP_CONSTEXPR bool treat_as_floating_point_v
@@ -422,7 +422,7 @@ template <class _Rep> _LIBCPP_CONSTEXPR bool treat_as_floating_point_v
#endif
template <class _Rep>
-struct _LIBCPP_TYPE_VIS_ONLY duration_values
+struct _LIBCPP_TEMPLATE_VIS duration_values
{
public:
_LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR _Rep zero() {return _Rep(0);}
@@ -485,7 +485,7 @@ round(const duration<_Rep, _Period>& __d)
// duration
template <class _Rep, class _Period>
-class _LIBCPP_TYPE_VIS_ONLY duration
+class _LIBCPP_TEMPLATE_VIS duration
{
static_assert(!__is_duration<_Rep>::value, "A duration representation can not be a duration");
static_assert(__is_ratio<_Period>::value, "Second template parameter of duration must be a std::ratio");
@@ -567,18 +567,18 @@ public:
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR duration operator+() const {return *this;}
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR duration operator-() const {return duration(-__rep_);}
- _LIBCPP_INLINE_VISIBILITY duration& operator++() {++__rep_; return *this;}
- _LIBCPP_INLINE_VISIBILITY duration operator++(int) {return duration(__rep_++);}
- _LIBCPP_INLINE_VISIBILITY duration& operator--() {--__rep_; return *this;}
- _LIBCPP_INLINE_VISIBILITY duration operator--(int) {return duration(__rep_--);}
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 duration& operator++() {++__rep_; return *this;}
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 duration operator++(int) {return duration(__rep_++);}
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 duration& operator--() {--__rep_; return *this;}
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 duration operator--(int) {return duration(__rep_--);}
- _LIBCPP_INLINE_VISIBILITY duration& operator+=(const duration& __d) {__rep_ += __d.count(); return *this;}
- _LIBCPP_INLINE_VISIBILITY duration& operator-=(const duration& __d) {__rep_ -= __d.count(); return *this;}
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 duration& operator+=(const duration& __d) {__rep_ += __d.count(); return *this;}
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 duration& operator-=(const duration& __d) {__rep_ -= __d.count(); return *this;}
- _LIBCPP_INLINE_VISIBILITY duration& operator*=(const rep& rhs) {__rep_ *= rhs; return *this;}
- _LIBCPP_INLINE_VISIBILITY duration& operator/=(const rep& rhs) {__rep_ /= rhs; return *this;}
- _LIBCPP_INLINE_VISIBILITY duration& operator%=(const rep& rhs) {__rep_ %= rhs; return *this;}
- _LIBCPP_INLINE_VISIBILITY duration& operator%=(const duration& rhs) {__rep_ %= rhs.count(); return *this;}
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 duration& operator*=(const rep& rhs) {__rep_ *= rhs; return *this;}
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 duration& operator/=(const rep& rhs) {__rep_ /= rhs; return *this;}
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 duration& operator%=(const rep& rhs) {__rep_ %= rhs; return *this;}
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 duration& operator%=(const duration& rhs) {__rep_ %= rhs.count(); return *this;}
// special values
@@ -828,7 +828,7 @@ operator%(const duration<_Rep1, _Period1>& __lhs, const duration<_Rep2, _Period2
//////////////////////////////////////////////////////////
template <class _Clock, class _Duration = typename _Clock::duration>
-class _LIBCPP_TYPE_VIS_ONLY time_point
+class _LIBCPP_TEMPLATE_VIS time_point
{
static_assert(__is_duration<_Duration>::value,
"Second template parameter of time_point must be a std::chrono::duration");
@@ -872,7 +872,7 @@ public:
} // chrono
template <class _Clock, class _Duration1, class _Duration2>
-struct _LIBCPP_TYPE_VIS_ONLY common_type<chrono::time_point<_Clock, _Duration1>,
+struct _LIBCPP_TEMPLATE_VIS common_type<chrono::time_point<_Clock, _Duration1>,
chrono::time_point<_Clock, _Duration2> >
{
typedef chrono::time_point<_Clock, typename common_type<_Duration1, _Duration2>::type> type;