IAP GITLAB

Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • AirShowerPhysics/corsika
  • rulrich/corsika
  • AAAlvesJr/corsika
  • Andre/corsika
  • arrabito/corsika
  • Nikos/corsika
  • olheiser73/corsika
  • AirShowerPhysics/papers/corsika
  • pranav/corsika
9 results
Show changes
Showing
with 0 additions and 3809 deletions
//
// bind/mem_fn_template.hpp
//
// Do not include this header directly
//
// Copyright (c) 2001 Peter Dimov and Multi Media Ltd.
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/bind/mem_fn.html for documentation.
//
#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING)
# define BOOST_MEM_FN_ENABLE_CONST_OVERLOADS
#endif
// mf0
template<class R, class T BOOST_MEM_FN_CLASS_F> class BOOST_MEM_FN_NAME(mf0)
{
public:
typedef R result_type;
typedef T * argument_type;
private:
BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) ())
F f_;
template<class U> R call(U & u, T const *) const
{
BOOST_MEM_FN_RETURN (u.*f_)();
}
template<class U> R call(U & u, void const *) const
{
BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)();
}
public:
explicit BOOST_MEM_FN_NAME(mf0)(F f): f_(f) {}
R operator()(T * p) const
{
BOOST_MEM_FN_RETURN (p->*f_)();
}
template<class U> R operator()(U & u) const
{
U const * p = 0;
BOOST_MEM_FN_RETURN call(u, p);
}
#ifdef BOOST_MEM_FN_ENABLE_CONST_OVERLOADS
template<class U> R operator()(U const & u) const
{
U const * p = 0;
BOOST_MEM_FN_RETURN call(u, p);
}
#endif
R operator()(T & t) const
{
BOOST_MEM_FN_RETURN (t.*f_)();
}
bool operator==(BOOST_MEM_FN_NAME(mf0) const & rhs) const
{
return f_ == rhs.f_;
}
bool operator!=(BOOST_MEM_FN_NAME(mf0) const & rhs) const
{
return f_ != rhs.f_;
}
};
// cmf0
template<class R, class T BOOST_MEM_FN_CLASS_F> class BOOST_MEM_FN_NAME(cmf0)
{
public:
typedef R result_type;
typedef T const * argument_type;
private:
BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) () const)
F f_;
template<class U> R call(U & u, T const *) const
{
BOOST_MEM_FN_RETURN (u.*f_)();
}
template<class U> R call(U & u, void const *) const
{
BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)();
}
public:
explicit BOOST_MEM_FN_NAME(cmf0)(F f): f_(f) {}
template<class U> R operator()(U const & u) const
{
U const * p = 0;
BOOST_MEM_FN_RETURN call(u, p);
}
R operator()(T const & t) const
{
BOOST_MEM_FN_RETURN (t.*f_)();
}
bool operator==(BOOST_MEM_FN_NAME(cmf0) const & rhs) const
{
return f_ == rhs.f_;
}
bool operator!=(BOOST_MEM_FN_NAME(cmf0) const & rhs) const
{
return f_ != rhs.f_;
}
};
// mf1
template<class R, class T, class A1 BOOST_MEM_FN_CLASS_F> class BOOST_MEM_FN_NAME(mf1)
{
public:
typedef R result_type;
typedef T * first_argument_type;
typedef A1 second_argument_type;
private:
BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1))
F f_;
template<class U, class B1> R call(U & u, T const *, B1 & b1) const
{
BOOST_MEM_FN_RETURN (u.*f_)(b1);
}
template<class U, class B1> R call(U & u, void const *, B1 & b1) const
{
BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1);
}
public:
explicit BOOST_MEM_FN_NAME(mf1)(F f): f_(f) {}
R operator()(T * p, A1 a1) const
{
BOOST_MEM_FN_RETURN (p->*f_)(a1);
}
template<class U> R operator()(U & u, A1 a1) const
{
U const * p = 0;
BOOST_MEM_FN_RETURN call(u, p, a1);
}
#ifdef BOOST_MEM_FN_ENABLE_CONST_OVERLOADS
template<class U> R operator()(U const & u, A1 a1) const
{
U const * p = 0;
BOOST_MEM_FN_RETURN call(u, p, a1);
}
#endif
R operator()(T & t, A1 a1) const
{
BOOST_MEM_FN_RETURN (t.*f_)(a1);
}
bool operator==(BOOST_MEM_FN_NAME(mf1) const & rhs) const
{
return f_ == rhs.f_;
}
bool operator!=(BOOST_MEM_FN_NAME(mf1) const & rhs) const
{
return f_ != rhs.f_;
}
};
// cmf1
template<class R, class T, class A1 BOOST_MEM_FN_CLASS_F> class BOOST_MEM_FN_NAME(cmf1)
{
public:
typedef R result_type;
typedef T const * first_argument_type;
typedef A1 second_argument_type;
private:
BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1) const)
F f_;
template<class U, class B1> R call(U & u, T const *, B1 & b1) const
{
BOOST_MEM_FN_RETURN (u.*f_)(b1);
}
template<class U, class B1> R call(U & u, void const *, B1 & b1) const
{
BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1);
}
public:
explicit BOOST_MEM_FN_NAME(cmf1)(F f): f_(f) {}
template<class U> R operator()(U const & u, A1 a1) const
{
U const * p = 0;
BOOST_MEM_FN_RETURN call(u, p, a1);
}
R operator()(T const & t, A1 a1) const
{
BOOST_MEM_FN_RETURN (t.*f_)(a1);
}
bool operator==(BOOST_MEM_FN_NAME(cmf1) const & rhs) const
{
return f_ == rhs.f_;
}
bool operator!=(BOOST_MEM_FN_NAME(cmf1) const & rhs) const
{
return f_ != rhs.f_;
}
};
// mf2
template<class R, class T, class A1, class A2 BOOST_MEM_FN_CLASS_F> class BOOST_MEM_FN_NAME(mf2)
{
public:
typedef R result_type;
private:
BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2))
F f_;
template<class U, class B1, class B2> R call(U & u, T const *, B1 & b1, B2 & b2) const
{
BOOST_MEM_FN_RETURN (u.*f_)(b1, b2);
}
template<class U, class B1, class B2> R call(U & u, void const *, B1 & b1, B2 & b2) const
{
BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2);
}
public:
explicit BOOST_MEM_FN_NAME(mf2)(F f): f_(f) {}
R operator()(T * p, A1 a1, A2 a2) const
{
BOOST_MEM_FN_RETURN (p->*f_)(a1, a2);
}
template<class U> R operator()(U & u, A1 a1, A2 a2) const
{
U const * p = 0;
BOOST_MEM_FN_RETURN call(u, p, a1, a2);
}
#ifdef BOOST_MEM_FN_ENABLE_CONST_OVERLOADS
template<class U> R operator()(U const & u, A1 a1, A2 a2) const
{
U const * p = 0;
BOOST_MEM_FN_RETURN call(u, p, a1, a2);
}
#endif
R operator()(T & t, A1 a1, A2 a2) const
{
BOOST_MEM_FN_RETURN (t.*f_)(a1, a2);
}
bool operator==(BOOST_MEM_FN_NAME(mf2) const & rhs) const
{
return f_ == rhs.f_;
}
bool operator!=(BOOST_MEM_FN_NAME(mf2) const & rhs) const
{
return f_ != rhs.f_;
}
};
// cmf2
template<class R, class T, class A1, class A2 BOOST_MEM_FN_CLASS_F> class BOOST_MEM_FN_NAME(cmf2)
{
public:
typedef R result_type;
private:
BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2) const)
F f_;
template<class U, class B1, class B2> R call(U & u, T const *, B1 & b1, B2 & b2) const
{
BOOST_MEM_FN_RETURN (u.*f_)(b1, b2);
}
template<class U, class B1, class B2> R call(U & u, void const *, B1 & b1, B2 & b2) const
{
BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2);
}
public:
explicit BOOST_MEM_FN_NAME(cmf2)(F f): f_(f) {}
template<class U> R operator()(U const & u, A1 a1, A2 a2) const
{
U const * p = 0;
BOOST_MEM_FN_RETURN call(u, p, a1, a2);
}
R operator()(T const & t, A1 a1, A2 a2) const
{
BOOST_MEM_FN_RETURN (t.*f_)(a1, a2);
}
bool operator==(BOOST_MEM_FN_NAME(cmf2) const & rhs) const
{
return f_ == rhs.f_;
}
bool operator!=(BOOST_MEM_FN_NAME(cmf2) const & rhs) const
{
return f_ != rhs.f_;
}
};
// mf3
template<class R, class T, class A1, class A2, class A3 BOOST_MEM_FN_CLASS_F> class BOOST_MEM_FN_NAME(mf3)
{
public:
typedef R result_type;
private:
BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3))
F f_;
template<class U, class B1, class B2, class B3> R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3) const
{
BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3);
}
template<class U, class B1, class B2, class B3> R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3) const
{
BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3);
}
public:
explicit BOOST_MEM_FN_NAME(mf3)(F f): f_(f) {}
R operator()(T * p, A1 a1, A2 a2, A3 a3) const
{
BOOST_MEM_FN_RETURN (p->*f_)(a1, a2, a3);
}
template<class U> R operator()(U & u, A1 a1, A2 a2, A3 a3) const
{
U const * p = 0;
BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3);
}
#ifdef BOOST_MEM_FN_ENABLE_CONST_OVERLOADS
template<class U> R operator()(U const & u, A1 a1, A2 a2, A3 a3) const
{
U const * p = 0;
BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3);
}
#endif
R operator()(T & t, A1 a1, A2 a2, A3 a3) const
{
BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3);
}
bool operator==(BOOST_MEM_FN_NAME(mf3) const & rhs) const
{
return f_ == rhs.f_;
}
bool operator!=(BOOST_MEM_FN_NAME(mf3) const & rhs) const
{
return f_ != rhs.f_;
}
};
// cmf3
template<class R, class T, class A1, class A2, class A3 BOOST_MEM_FN_CLASS_F> class BOOST_MEM_FN_NAME(cmf3)
{
public:
typedef R result_type;
private:
BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3) const)
F f_;
template<class U, class B1, class B2, class B3> R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3) const
{
BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3);
}
template<class U, class B1, class B2, class B3> R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3) const
{
BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3);
}
public:
explicit BOOST_MEM_FN_NAME(cmf3)(F f): f_(f) {}
template<class U> R operator()(U const & u, A1 a1, A2 a2, A3 a3) const
{
U const * p = 0;
BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3);
}
R operator()(T const & t, A1 a1, A2 a2, A3 a3) const
{
BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3);
}
bool operator==(BOOST_MEM_FN_NAME(cmf3) const & rhs) const
{
return f_ == rhs.f_;
}
bool operator!=(BOOST_MEM_FN_NAME(cmf3) const & rhs) const
{
return f_ != rhs.f_;
}
};
// mf4
template<class R, class T, class A1, class A2, class A3, class A4 BOOST_MEM_FN_CLASS_F> class BOOST_MEM_FN_NAME(mf4)
{
public:
typedef R result_type;
private:
BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4))
F f_;
template<class U, class B1, class B2, class B3, class B4> R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4) const
{
BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4);
}
template<class U, class B1, class B2, class B3, class B4> R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4) const
{
BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4);
}
public:
explicit BOOST_MEM_FN_NAME(mf4)(F f): f_(f) {}
R operator()(T * p, A1 a1, A2 a2, A3 a3, A4 a4) const
{
BOOST_MEM_FN_RETURN (p->*f_)(a1, a2, a3, a4);
}
template<class U> R operator()(U & u, A1 a1, A2 a2, A3 a3, A4 a4) const
{
U const * p = 0;
BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4);
}
#ifdef BOOST_MEM_FN_ENABLE_CONST_OVERLOADS
template<class U> R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4) const
{
U const * p = 0;
BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4);
}
#endif
R operator()(T & t, A1 a1, A2 a2, A3 a3, A4 a4) const
{
BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4);
}
bool operator==(BOOST_MEM_FN_NAME(mf4) const & rhs) const
{
return f_ == rhs.f_;
}
bool operator!=(BOOST_MEM_FN_NAME(mf4) const & rhs) const
{
return f_ != rhs.f_;
}
};
// cmf4
template<class R, class T, class A1, class A2, class A3, class A4 BOOST_MEM_FN_CLASS_F> class BOOST_MEM_FN_NAME(cmf4)
{
public:
typedef R result_type;
private:
BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4) const)
F f_;
template<class U, class B1, class B2, class B3, class B4> R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4) const
{
BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4);
}
template<class U, class B1, class B2, class B3, class B4> R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4) const
{
BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4);
}
public:
explicit BOOST_MEM_FN_NAME(cmf4)(F f): f_(f) {}
template<class U> R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4) const
{
U const * p = 0;
BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4);
}
R operator()(T const & t, A1 a1, A2 a2, A3 a3, A4 a4) const
{
BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4);
}
bool operator==(BOOST_MEM_FN_NAME(cmf4) const & rhs) const
{
return f_ == rhs.f_;
}
bool operator!=(BOOST_MEM_FN_NAME(cmf4) const & rhs) const
{
return f_ != rhs.f_;
}
};
// mf5
template<class R, class T, class A1, class A2, class A3, class A4, class A5 BOOST_MEM_FN_CLASS_F> class BOOST_MEM_FN_NAME(mf5)
{
public:
typedef R result_type;
private:
BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5))
F f_;
template<class U, class B1, class B2, class B3, class B4, class B5> R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5) const
{
BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4, b5);
}
template<class U, class B1, class B2, class B3, class B4, class B5> R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5) const
{
BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4, b5);
}
public:
explicit BOOST_MEM_FN_NAME(mf5)(F f): f_(f) {}
R operator()(T * p, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const
{
BOOST_MEM_FN_RETURN (p->*f_)(a1, a2, a3, a4, a5);
}
template<class U> R operator()(U & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const
{
U const * p = 0;
BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5);
}
#ifdef BOOST_MEM_FN_ENABLE_CONST_OVERLOADS
template<class U> R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const
{
U const * p = 0;
BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5);
}
#endif
R operator()(T & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const
{
BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4, a5);
}
bool operator==(BOOST_MEM_FN_NAME(mf5) const & rhs) const
{
return f_ == rhs.f_;
}
bool operator!=(BOOST_MEM_FN_NAME(mf5) const & rhs) const
{
return f_ != rhs.f_;
}
};
// cmf5
template<class R, class T, class A1, class A2, class A3, class A4, class A5 BOOST_MEM_FN_CLASS_F> class BOOST_MEM_FN_NAME(cmf5)
{
public:
typedef R result_type;
private:
BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5) const)
F f_;
template<class U, class B1, class B2, class B3, class B4, class B5> R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5) const
{
BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4, b5);
}
template<class U, class B1, class B2, class B3, class B4, class B5> R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5) const
{
BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4, b5);
}
public:
explicit BOOST_MEM_FN_NAME(cmf5)(F f): f_(f) {}
template<class U> R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const
{
U const * p = 0;
BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5);
}
R operator()(T const & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const
{
BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4, a5);
}
bool operator==(BOOST_MEM_FN_NAME(cmf5) const & rhs) const
{
return f_ == rhs.f_;
}
bool operator!=(BOOST_MEM_FN_NAME(cmf5) const & rhs) const
{
return f_ != rhs.f_;
}
};
// mf6
template<class R, class T, class A1, class A2, class A3, class A4, class A5, class A6 BOOST_MEM_FN_CLASS_F> class BOOST_MEM_FN_NAME(mf6)
{
public:
typedef R result_type;
private:
BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6))
F f_;
template<class U, class B1, class B2, class B3, class B4, class B5, class B6> R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6) const
{
BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4, b5, b6);
}
template<class U, class B1, class B2, class B3, class B4, class B5, class B6> R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6) const
{
BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4, b5, b6);
}
public:
explicit BOOST_MEM_FN_NAME(mf6)(F f): f_(f) {}
R operator()(T * p, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const
{
BOOST_MEM_FN_RETURN (p->*f_)(a1, a2, a3, a4, a5, a6);
}
template<class U> R operator()(U & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const
{
U const * p = 0;
BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6);
}
#ifdef BOOST_MEM_FN_ENABLE_CONST_OVERLOADS
template<class U> R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const
{
U const * p = 0;
BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6);
}
#endif
R operator()(T & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const
{
BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4, a5, a6);
}
bool operator==(BOOST_MEM_FN_NAME(mf6) const & rhs) const
{
return f_ == rhs.f_;
}
bool operator!=(BOOST_MEM_FN_NAME(mf6) const & rhs) const
{
return f_ != rhs.f_;
}
};
// cmf6
template<class R, class T, class A1, class A2, class A3, class A4, class A5, class A6 BOOST_MEM_FN_CLASS_F> class BOOST_MEM_FN_NAME(cmf6)
{
public:
typedef R result_type;
private:
BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6) const)
F f_;
template<class U, class B1, class B2, class B3, class B4, class B5, class B6> R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6) const
{
BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4, b5, b6);
}
template<class U, class B1, class B2, class B3, class B4, class B5, class B6> R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6) const
{
BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4, b5, b6);
}
public:
explicit BOOST_MEM_FN_NAME(cmf6)(F f): f_(f) {}
template<class U> R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const
{
U const * p = 0;
BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6);
}
R operator()(T const & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const
{
BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4, a5, a6);
}
bool operator==(BOOST_MEM_FN_NAME(cmf6) const & rhs) const
{
return f_ == rhs.f_;
}
bool operator!=(BOOST_MEM_FN_NAME(cmf6) const & rhs) const
{
return f_ != rhs.f_;
}
};
// mf7
template<class R, class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7 BOOST_MEM_FN_CLASS_F> class BOOST_MEM_FN_NAME(mf7)
{
public:
typedef R result_type;
private:
BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6, A7))
F f_;
template<class U, class B1, class B2, class B3, class B4, class B5, class B6, class B7> R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7) const
{
BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4, b5, b6, b7);
}
template<class U, class B1, class B2, class B3, class B4, class B5, class B6, class B7> R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7) const
{
BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4, b5, b6, b7);
}
public:
explicit BOOST_MEM_FN_NAME(mf7)(F f): f_(f) {}
R operator()(T * p, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const
{
BOOST_MEM_FN_RETURN (p->*f_)(a1, a2, a3, a4, a5, a6, a7);
}
template<class U> R operator()(U & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const
{
U const * p = 0;
BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6, a7);
}
#ifdef BOOST_MEM_FN_ENABLE_CONST_OVERLOADS
template<class U> R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const
{
U const * p = 0;
BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6, a7);
}
#endif
R operator()(T & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const
{
BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4, a5, a6, a7);
}
bool operator==(BOOST_MEM_FN_NAME(mf7) const & rhs) const
{
return f_ == rhs.f_;
}
bool operator!=(BOOST_MEM_FN_NAME(mf7) const & rhs) const
{
return f_ != rhs.f_;
}
};
// cmf7
template<class R, class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7 BOOST_MEM_FN_CLASS_F> class BOOST_MEM_FN_NAME(cmf7)
{
public:
typedef R result_type;
private:
BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6, A7) const)
F f_;
template<class U, class B1, class B2, class B3, class B4, class B5, class B6, class B7> R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7) const
{
BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4, b5, b6, b7);
}
template<class U, class B1, class B2, class B3, class B4, class B5, class B6, class B7> R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7) const
{
BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4, b5, b6, b7);
}
public:
explicit BOOST_MEM_FN_NAME(cmf7)(F f): f_(f) {}
template<class U> R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const
{
U const * p = 0;
BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6, a7);
}
R operator()(T const & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const
{
BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4, a5, a6, a7);
}
bool operator==(BOOST_MEM_FN_NAME(cmf7) const & rhs) const
{
return f_ == rhs.f_;
}
bool operator!=(BOOST_MEM_FN_NAME(cmf7) const & rhs) const
{
return f_ != rhs.f_;
}
};
// mf8
template<class R, class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8 BOOST_MEM_FN_CLASS_F> class BOOST_MEM_FN_NAME(mf8)
{
public:
typedef R result_type;
private:
BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6, A7, A8))
F f_;
template<class U, class B1, class B2, class B3, class B4, class B5, class B6, class B7, class B8> R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7, B8 & b8) const
{
BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4, b5, b6, b7, b8);
}
template<class U, class B1, class B2, class B3, class B4, class B5, class B6, class B7, class B8> R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7, B8 & b8) const
{
BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4, b5, b6, b7, b8);
}
public:
explicit BOOST_MEM_FN_NAME(mf8)(F f): f_(f) {}
R operator()(T * p, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const
{
BOOST_MEM_FN_RETURN (p->*f_)(a1, a2, a3, a4, a5, a6, a7, a8);
}
template<class U> R operator()(U & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const
{
U const * p = 0;
BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6, a7, a8);
}
#ifdef BOOST_MEM_FN_ENABLE_CONST_OVERLOADS
template<class U> R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const
{
U const * p = 0;
BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6, a7, a8);
}
#endif
R operator()(T & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const
{
BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4, a5, a6, a7, a8);
}
bool operator==(BOOST_MEM_FN_NAME(mf8) const & rhs) const
{
return f_ == rhs.f_;
}
bool operator!=(BOOST_MEM_FN_NAME(mf8) const & rhs) const
{
return f_ != rhs.f_;
}
};
// cmf8
template<class R, class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8 BOOST_MEM_FN_CLASS_F> class BOOST_MEM_FN_NAME(cmf8)
{
public:
typedef R result_type;
private:
BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6, A7, A8) const)
F f_;
template<class U, class B1, class B2, class B3, class B4, class B5, class B6, class B7, class B8> R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7, B8 & b8) const
{
BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4, b5, b6, b7, b8);
}
template<class U, class B1, class B2, class B3, class B4, class B5, class B6, class B7, class B8> R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7, B8 & b8) const
{
BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4, b5, b6, b7, b8);
}
public:
explicit BOOST_MEM_FN_NAME(cmf8)(F f): f_(f) {}
R operator()(T const * p, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const
{
BOOST_MEM_FN_RETURN (p->*f_)(a1, a2, a3, a4, a5, a6, a7, a8);
}
template<class U> R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const
{
U const * p = 0;
BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6, a7, a8);
}
R operator()(T const & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const
{
BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4, a5, a6, a7, a8);
}
bool operator==(BOOST_MEM_FN_NAME(cmf8) const & rhs) const
{
return f_ == rhs.f_;
}
bool operator!=(BOOST_MEM_FN_NAME(cmf8) const & rhs) const
{
return f_ != rhs.f_;
}
};
#undef BOOST_MEM_FN_ENABLE_CONST_OVERLOADS
//
// bind/mem_fn_vw.hpp - void return helper wrappers
//
// Do not include this header directly
//
// Copyright (c) 2001 Peter Dimov and Multi Media Ltd.
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/bind/mem_fn.html for documentation.
//
template<class R, class T> struct BOOST_MEM_FN_NAME(mf0): public mf<R>::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf0)<R, T, R (BOOST_MEM_FN_CC T::*) ()>
{
typedef R (BOOST_MEM_FN_CC T::*F) ();
explicit BOOST_MEM_FN_NAME(mf0)(F f): mf<R>::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf0)<R, T, F>(f) {}
};
template<class R, class T> struct BOOST_MEM_FN_NAME(cmf0): public mf<R>::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf0)<R, T, R (BOOST_MEM_FN_CC T::*) () const>
{
typedef R (BOOST_MEM_FN_CC T::*F) () const;
explicit BOOST_MEM_FN_NAME(cmf0)(F f): mf<R>::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf0)<R, T, F>(f) {}
};
template<class R, class T, class A1> struct BOOST_MEM_FN_NAME(mf1): public mf<R>::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf1)<R, T, A1, R (BOOST_MEM_FN_CC T::*) (A1)>
{
typedef R (BOOST_MEM_FN_CC T::*F) (A1);
explicit BOOST_MEM_FN_NAME(mf1)(F f): mf<R>::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf1)<R, T, A1, F>(f) {}
};
template<class R, class T, class A1> struct BOOST_MEM_FN_NAME(cmf1): public mf<R>::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf1)<R, T, A1, R (BOOST_MEM_FN_CC T::*) (A1) const>
{
typedef R (BOOST_MEM_FN_CC T::*F) (A1) const;
explicit BOOST_MEM_FN_NAME(cmf1)(F f): mf<R>::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf1)<R, T, A1, F>(f) {}
};
template<class R, class T, class A1, class A2> struct BOOST_MEM_FN_NAME(mf2): public mf<R>::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf2)<R, T, A1, A2, R (BOOST_MEM_FN_CC T::*) (A1, A2)>
{
typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2);
explicit BOOST_MEM_FN_NAME(mf2)(F f): mf<R>::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf2)<R, T, A1, A2, F>(f) {}
};
template<class R, class T, class A1, class A2> struct BOOST_MEM_FN_NAME(cmf2): public mf<R>::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf2)<R, T, A1, A2, R (BOOST_MEM_FN_CC T::*) (A1, A2) const>
{
typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2) const;
explicit BOOST_MEM_FN_NAME(cmf2)(F f): mf<R>::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf2)<R, T, A1, A2, F>(f) {}
};
template<class R, class T, class A1, class A2, class A3> struct BOOST_MEM_FN_NAME(mf3): public mf<R>::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf3)<R, T, A1, A2, A3, R (BOOST_MEM_FN_CC T::*) (A1, A2, A3)>
{
typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3);
explicit BOOST_MEM_FN_NAME(mf3)(F f): mf<R>::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf3)<R, T, A1, A2, A3, F>(f) {}
};
template<class R, class T, class A1, class A2, class A3> struct BOOST_MEM_FN_NAME(cmf3): public mf<R>::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf3)<R, T, A1, A2, A3, R (BOOST_MEM_FN_CC T::*) (A1, A2, A3) const>
{
typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3) const;
explicit BOOST_MEM_FN_NAME(cmf3)(F f): mf<R>::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf3)<R, T, A1, A2, A3, F>(f) {}
};
template<class R, class T, class A1, class A2, class A3, class A4> struct BOOST_MEM_FN_NAME(mf4): public mf<R>::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf4)<R, T, A1, A2, A3, A4, R (BOOST_MEM_FN_CC T::*) (A1, A2, A3, A4)>
{
typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4);
explicit BOOST_MEM_FN_NAME(mf4)(F f): mf<R>::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf4)<R, T, A1, A2, A3, A4, F>(f) {}
};
template<class R, class T, class A1, class A2, class A3, class A4> struct BOOST_MEM_FN_NAME(cmf4): public mf<R>::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf4)<R, T, A1, A2, A3, A4, R (BOOST_MEM_FN_CC T::*) (A1, A2, A3, A4) const>
{
typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4) const;
explicit BOOST_MEM_FN_NAME(cmf4)(F f): mf<R>::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf4)<R, T, A1, A2, A3, A4, F>(f) {}
};
template<class R, class T, class A1, class A2, class A3, class A4, class A5> struct BOOST_MEM_FN_NAME(mf5): public mf<R>::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf5)<R, T, A1, A2, A3, A4, A5, R (BOOST_MEM_FN_CC T::*) (A1, A2, A3, A4, A5)>
{
typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5);
explicit BOOST_MEM_FN_NAME(mf5)(F f): mf<R>::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf5)<R, T, A1, A2, A3, A4, A5, F>(f) {}
};
template<class R, class T, class A1, class A2, class A3, class A4, class A5> struct BOOST_MEM_FN_NAME(cmf5): public mf<R>::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf5)<R, T, A1, A2, A3, A4, A5, R (BOOST_MEM_FN_CC T::*) (A1, A2, A3, A4, A5) const>
{
typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5) const;
explicit BOOST_MEM_FN_NAME(cmf5)(F f): mf<R>::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf5)<R, T, A1, A2, A3, A4, A5, F>(f) {}
};
template<class R, class T, class A1, class A2, class A3, class A4, class A5, class A6> struct BOOST_MEM_FN_NAME(mf6): public mf<R>::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf6)<R, T, A1, A2, A3, A4, A5, A6, R (BOOST_MEM_FN_CC T::*) (A1, A2, A3, A4, A5, A6)>
{
typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6);
explicit BOOST_MEM_FN_NAME(mf6)(F f): mf<R>::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf6)<R, T, A1, A2, A3, A4, A5, A6, F>(f) {}
};
template<class R, class T, class A1, class A2, class A3, class A4, class A5, class A6> struct BOOST_MEM_FN_NAME(cmf6): public mf<R>::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf6)<R, T, A1, A2, A3, A4, A5, A6, R (BOOST_MEM_FN_CC T::*) (A1, A2, A3, A4, A5, A6) const>
{
typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6) const;
explicit BOOST_MEM_FN_NAME(cmf6)(F f): mf<R>::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf6)<R, T, A1, A2, A3, A4, A5, A6, F>(f) {}
};
template<class R, class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7> struct BOOST_MEM_FN_NAME(mf7): public mf<R>::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf7)<R, T, A1, A2, A3, A4, A5, A6, A7, R (BOOST_MEM_FN_CC T::*) (A1, A2, A3, A4, A5, A6, A7)>
{
typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6, A7);
explicit BOOST_MEM_FN_NAME(mf7)(F f): mf<R>::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf7)<R, T, A1, A2, A3, A4, A5, A6, A7, F>(f) {}
};
template<class R, class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7> struct BOOST_MEM_FN_NAME(cmf7): public mf<R>::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf7)<R, T, A1, A2, A3, A4, A5, A6, A7, R (BOOST_MEM_FN_CC T::*) (A1, A2, A3, A4, A5, A6, A7) const>
{
typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6, A7) const;
explicit BOOST_MEM_FN_NAME(cmf7)(F f): mf<R>::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf7)<R, T, A1, A2, A3, A4, A5, A6, A7, F>(f) {}
};
template<class R, class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8> struct BOOST_MEM_FN_NAME(mf8): public mf<R>::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf8)<R, T, A1, A2, A3, A4, A5, A6, A7, A8, R (BOOST_MEM_FN_CC T::*) (A1, A2, A3, A4, A5, A6, A7, A8)>
{
typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6, A7, A8);
explicit BOOST_MEM_FN_NAME(mf8)(F f): mf<R>::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf8)<R, T, A1, A2, A3, A4, A5, A6, A7, A8, F>(f) {}
};
template<class R, class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8> struct BOOST_MEM_FN_NAME(cmf8): public mf<R>::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf8)<R, T, A1, A2, A3, A4, A5, A6, A7, A8, R (BOOST_MEM_FN_CC T::*) (A1, A2, A3, A4, A5, A6, A7, A8) const>
{
typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6, A7, A8) const;
explicit BOOST_MEM_FN_NAME(cmf8)(F f): mf<R>::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf8)<R, T, A1, A2, A3, A4, A5, A6, A7, A8, F>(f) {}
};
#ifndef BOOST_BIND_PLACEHOLDERS_HPP_INCLUDED
#define BOOST_BIND_PLACEHOLDERS_HPP_INCLUDED
// MS compatible compilers support #pragma once
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
//
// bind/placeholders.hpp - _N definitions
//
// Copyright (c) 2002 Peter Dimov and Multi Media Ltd.
// Copyright 2015 Peter Dimov
//
// Distributed under the Boost Software License, Version 1.0.
// See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt
//
// See http://www.boost.org/libs/bind/bind.html for documentation.
//
#include <boost/bind/arg.hpp>
#include <boost/config.hpp>
namespace boost
{
namespace placeholders
{
#if defined(__BORLANDC__) || defined(__GNUC__) && (__GNUC__ < 4)
inline boost::arg<1> _1() { return boost::arg<1>(); }
inline boost::arg<2> _2() { return boost::arg<2>(); }
inline boost::arg<3> _3() { return boost::arg<3>(); }
inline boost::arg<4> _4() { return boost::arg<4>(); }
inline boost::arg<5> _5() { return boost::arg<5>(); }
inline boost::arg<6> _6() { return boost::arg<6>(); }
inline boost::arg<7> _7() { return boost::arg<7>(); }
inline boost::arg<8> _8() { return boost::arg<8>(); }
inline boost::arg<9> _9() { return boost::arg<9>(); }
#else
BOOST_STATIC_CONSTEXPR boost::arg<1> _1;
BOOST_STATIC_CONSTEXPR boost::arg<2> _2;
BOOST_STATIC_CONSTEXPR boost::arg<3> _3;
BOOST_STATIC_CONSTEXPR boost::arg<4> _4;
BOOST_STATIC_CONSTEXPR boost::arg<5> _5;
BOOST_STATIC_CONSTEXPR boost::arg<6> _6;
BOOST_STATIC_CONSTEXPR boost::arg<7> _7;
BOOST_STATIC_CONSTEXPR boost::arg<8> _8;
BOOST_STATIC_CONSTEXPR boost::arg<9> _9;
#endif
} // namespace placeholders
} // namespace boost
#endif // #ifndef BOOST_BIND_PLACEHOLDERS_HPP_INCLUDED
#ifndef BOOST_BIND_STORAGE_HPP_INCLUDED
#define BOOST_BIND_STORAGE_HPP_INCLUDED
// MS compatible compilers support #pragma once
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
//
// bind/storage.hpp
//
// boost/bind.hpp support header, optimized storage
//
// Copyright (c) 2006 Peter Dimov
//
// Distributed under the Boost Software License, Version 1.0.
// See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt
//
// See http://www.boost.org/libs/bind/bind.html for documentation.
//
#include <boost/config.hpp>
#include <boost/bind/arg.hpp>
#ifdef BOOST_MSVC
# pragma warning(push)
# pragma warning(disable: 4512) // assignment operator could not be generated
#endif
namespace boost
{
namespace _bi
{
// 1
template<class A1> struct storage1
{
explicit storage1( A1 a1 ): a1_( a1 ) {}
template<class V> void accept(V & v) const
{
BOOST_BIND_VISIT_EACH(v, a1_, 0);
}
A1 a1_;
};
#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) && !defined( __BORLANDC__ )
template<int I> struct storage1< boost::arg<I> >
{
explicit storage1( boost::arg<I> ) {}
template<class V> void accept(V &) const { }
static boost::arg<I> a1_() { return boost::arg<I>(); }
};
template<int I> struct storage1< boost::arg<I> (*) () >
{
explicit storage1( boost::arg<I> (*) () ) {}
template<class V> void accept(V &) const { }
static boost::arg<I> a1_() { return boost::arg<I>(); }
};
#endif
// 2
template<class A1, class A2> struct storage2: public storage1<A1>
{
typedef storage1<A1> inherited;
storage2( A1 a1, A2 a2 ): storage1<A1>( a1 ), a2_( a2 ) {}
template<class V> void accept(V & v) const
{
inherited::accept(v);
BOOST_BIND_VISIT_EACH(v, a2_, 0);
}
A2 a2_;
};
#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
template<class A1, int I> struct storage2< A1, boost::arg<I> >: public storage1<A1>
{
typedef storage1<A1> inherited;
storage2( A1 a1, boost::arg<I> ): storage1<A1>( a1 ) {}
template<class V> void accept(V & v) const
{
inherited::accept(v);
}
static boost::arg<I> a2_() { return boost::arg<I>(); }
};
template<class A1, int I> struct storage2< A1, boost::arg<I> (*) () >: public storage1<A1>
{
typedef storage1<A1> inherited;
storage2( A1 a1, boost::arg<I> (*) () ): storage1<A1>( a1 ) {}
template<class V> void accept(V & v) const
{
inherited::accept(v);
}
static boost::arg<I> a2_() { return boost::arg<I>(); }
};
#endif
// 3
template<class A1, class A2, class A3> struct storage3: public storage2< A1, A2 >
{
typedef storage2<A1, A2> inherited;
storage3( A1 a1, A2 a2, A3 a3 ): storage2<A1, A2>( a1, a2 ), a3_( a3 ) {}
template<class V> void accept(V & v) const
{
inherited::accept(v);
BOOST_BIND_VISIT_EACH(v, a3_, 0);
}
A3 a3_;
};
#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
template<class A1, class A2, int I> struct storage3< A1, A2, boost::arg<I> >: public storage2< A1, A2 >
{
typedef storage2<A1, A2> inherited;
storage3( A1 a1, A2 a2, boost::arg<I> ): storage2<A1, A2>( a1, a2 ) {}
template<class V> void accept(V & v) const
{
inherited::accept(v);
}
static boost::arg<I> a3_() { return boost::arg<I>(); }
};
template<class A1, class A2, int I> struct storage3< A1, A2, boost::arg<I> (*) () >: public storage2< A1, A2 >
{
typedef storage2<A1, A2> inherited;
storage3( A1 a1, A2 a2, boost::arg<I> (*) () ): storage2<A1, A2>( a1, a2 ) {}
template<class V> void accept(V & v) const
{
inherited::accept(v);
}
static boost::arg<I> a3_() { return boost::arg<I>(); }
};
#endif
// 4
template<class A1, class A2, class A3, class A4> struct storage4: public storage3< A1, A2, A3 >
{
typedef storage3<A1, A2, A3> inherited;
storage4( A1 a1, A2 a2, A3 a3, A4 a4 ): storage3<A1, A2, A3>( a1, a2, a3 ), a4_( a4 ) {}
template<class V> void accept(V & v) const
{
inherited::accept(v);
BOOST_BIND_VISIT_EACH(v, a4_, 0);
}
A4 a4_;
};
#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
template<class A1, class A2, class A3, int I> struct storage4< A1, A2, A3, boost::arg<I> >: public storage3< A1, A2, A3 >
{
typedef storage3<A1, A2, A3> inherited;
storage4( A1 a1, A2 a2, A3 a3, boost::arg<I> ): storage3<A1, A2, A3>( a1, a2, a3 ) {}
template<class V> void accept(V & v) const
{
inherited::accept(v);
}
static boost::arg<I> a4_() { return boost::arg<I>(); }
};
template<class A1, class A2, class A3, int I> struct storage4< A1, A2, A3, boost::arg<I> (*) () >: public storage3< A1, A2, A3 >
{
typedef storage3<A1, A2, A3> inherited;
storage4( A1 a1, A2 a2, A3 a3, boost::arg<I> (*) () ): storage3<A1, A2, A3>( a1, a2, a3 ) {}
template<class V> void accept(V & v) const
{
inherited::accept(v);
}
static boost::arg<I> a4_() { return boost::arg<I>(); }
};
#endif
// 5
template<class A1, class A2, class A3, class A4, class A5> struct storage5: public storage4< A1, A2, A3, A4 >
{
typedef storage4<A1, A2, A3, A4> inherited;
storage5( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5 ): storage4<A1, A2, A3, A4>( a1, a2, a3, a4 ), a5_( a5 ) {}
template<class V> void accept(V & v) const
{
inherited::accept(v);
BOOST_BIND_VISIT_EACH(v, a5_, 0);
}
A5 a5_;
};
#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
template<class A1, class A2, class A3, class A4, int I> struct storage5< A1, A2, A3, A4, boost::arg<I> >: public storage4< A1, A2, A3, A4 >
{
typedef storage4<A1, A2, A3, A4> inherited;
storage5( A1 a1, A2 a2, A3 a3, A4 a4, boost::arg<I> ): storage4<A1, A2, A3, A4>( a1, a2, a3, a4 ) {}
template<class V> void accept(V & v) const
{
inherited::accept(v);
}
static boost::arg<I> a5_() { return boost::arg<I>(); }
};
template<class A1, class A2, class A3, class A4, int I> struct storage5< A1, A2, A3, A4, boost::arg<I> (*) () >: public storage4< A1, A2, A3, A4 >
{
typedef storage4<A1, A2, A3, A4> inherited;
storage5( A1 a1, A2 a2, A3 a3, A4 a4, boost::arg<I> (*) () ): storage4<A1, A2, A3, A4>( a1, a2, a3, a4 ) {}
template<class V> void accept(V & v) const
{
inherited::accept(v);
}
static boost::arg<I> a5_() { return boost::arg<I>(); }
};
#endif
// 6
template<class A1, class A2, class A3, class A4, class A5, class A6> struct storage6: public storage5< A1, A2, A3, A4, A5 >
{
typedef storage5<A1, A2, A3, A4, A5> inherited;
storage6( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6 ): storage5<A1, A2, A3, A4, A5>( a1, a2, a3, a4, a5 ), a6_( a6 ) {}
template<class V> void accept(V & v) const
{
inherited::accept(v);
BOOST_BIND_VISIT_EACH(v, a6_, 0);
}
A6 a6_;
};
#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
template<class A1, class A2, class A3, class A4, class A5, int I> struct storage6< A1, A2, A3, A4, A5, boost::arg<I> >: public storage5< A1, A2, A3, A4, A5 >
{
typedef storage5<A1, A2, A3, A4, A5> inherited;
storage6( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, boost::arg<I> ): storage5<A1, A2, A3, A4, A5>( a1, a2, a3, a4, a5 ) {}
template<class V> void accept(V & v) const
{
inherited::accept(v);
}
static boost::arg<I> a6_() { return boost::arg<I>(); }
};
template<class A1, class A2, class A3, class A4, class A5, int I> struct storage6< A1, A2, A3, A4, A5, boost::arg<I> (*) () >: public storage5< A1, A2, A3, A4, A5 >
{
typedef storage5<A1, A2, A3, A4, A5> inherited;
storage6( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, boost::arg<I> (*) () ): storage5<A1, A2, A3, A4, A5>( a1, a2, a3, a4, a5 ) {}
template<class V> void accept(V & v) const
{
inherited::accept(v);
}
static boost::arg<I> a6_() { return boost::arg<I>(); }
};
#endif
// 7
template<class A1, class A2, class A3, class A4, class A5, class A6, class A7> struct storage7: public storage6< A1, A2, A3, A4, A5, A6 >
{
typedef storage6<A1, A2, A3, A4, A5, A6> inherited;
storage7( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7 ): storage6<A1, A2, A3, A4, A5, A6>( a1, a2, a3, a4, a5, a6 ), a7_( a7 ) {}
template<class V> void accept(V & v) const
{
inherited::accept(v);
BOOST_BIND_VISIT_EACH(v, a7_, 0);
}
A7 a7_;
};
#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
template<class A1, class A2, class A3, class A4, class A5, class A6, int I> struct storage7< A1, A2, A3, A4, A5, A6, boost::arg<I> >: public storage6< A1, A2, A3, A4, A5, A6 >
{
typedef storage6<A1, A2, A3, A4, A5, A6> inherited;
storage7( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, boost::arg<I> ): storage6<A1, A2, A3, A4, A5, A6>( a1, a2, a3, a4, a5, a6 ) {}
template<class V> void accept(V & v) const
{
inherited::accept(v);
}
static boost::arg<I> a7_() { return boost::arg<I>(); }
};
template<class A1, class A2, class A3, class A4, class A5, class A6, int I> struct storage7< A1, A2, A3, A4, A5, A6, boost::arg<I> (*) () >: public storage6< A1, A2, A3, A4, A5, A6 >
{
typedef storage6<A1, A2, A3, A4, A5, A6> inherited;
storage7( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, boost::arg<I> (*) () ): storage6<A1, A2, A3, A4, A5, A6>( a1, a2, a3, a4, a5, a6 ) {}
template<class V> void accept(V & v) const
{
inherited::accept(v);
}
static boost::arg<I> a7_() { return boost::arg<I>(); }
};
#endif
// 8
template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8> struct storage8: public storage7< A1, A2, A3, A4, A5, A6, A7 >
{
typedef storage7<A1, A2, A3, A4, A5, A6, A7> inherited;
storage8( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8 ): storage7<A1, A2, A3, A4, A5, A6, A7>( a1, a2, a3, a4, a5, a6, a7 ), a8_( a8 ) {}
template<class V> void accept(V & v) const
{
inherited::accept(v);
BOOST_BIND_VISIT_EACH(v, a8_, 0);
}
A8 a8_;
};
#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, int I> struct storage8< A1, A2, A3, A4, A5, A6, A7, boost::arg<I> >: public storage7< A1, A2, A3, A4, A5, A6, A7 >
{
typedef storage7<A1, A2, A3, A4, A5, A6, A7> inherited;
storage8( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, boost::arg<I> ): storage7<A1, A2, A3, A4, A5, A6, A7>( a1, a2, a3, a4, a5, a6, a7 ) {}
template<class V> void accept(V & v) const
{
inherited::accept(v);
}
static boost::arg<I> a8_() { return boost::arg<I>(); }
};
template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, int I> struct storage8< A1, A2, A3, A4, A5, A6, A7, boost::arg<I> (*) () >: public storage7< A1, A2, A3, A4, A5, A6, A7 >
{
typedef storage7<A1, A2, A3, A4, A5, A6, A7> inherited;
storage8( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, boost::arg<I> (*) () ): storage7<A1, A2, A3, A4, A5, A6, A7>( a1, a2, a3, a4, a5, a6, a7 ) {}
template<class V> void accept(V & v) const
{
inherited::accept(v);
}
static boost::arg<I> a8_() { return boost::arg<I>(); }
};
#endif
// 9
template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9> struct storage9: public storage8< A1, A2, A3, A4, A5, A6, A7, A8 >
{
typedef storage8<A1, A2, A3, A4, A5, A6, A7, A8> inherited;
storage9( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9 ): storage8<A1, A2, A3, A4, A5, A6, A7, A8>( a1, a2, a3, a4, a5, a6, a7, a8 ), a9_( a9 ) {}
template<class V> void accept(V & v) const
{
inherited::accept(v);
BOOST_BIND_VISIT_EACH(v, a9_, 0);
}
A9 a9_;
};
#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, int I> struct storage9< A1, A2, A3, A4, A5, A6, A7, A8, boost::arg<I> >: public storage8< A1, A2, A3, A4, A5, A6, A7, A8 >
{
typedef storage8<A1, A2, A3, A4, A5, A6, A7, A8> inherited;
storage9( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, boost::arg<I> ): storage8<A1, A2, A3, A4, A5, A6, A7, A8>( a1, a2, a3, a4, a5, a6, a7, a8 ) {}
template<class V> void accept(V & v) const
{
inherited::accept(v);
}
static boost::arg<I> a9_() { return boost::arg<I>(); }
};
template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, int I> struct storage9< A1, A2, A3, A4, A5, A6, A7, A8, boost::arg<I> (*) () >: public storage8< A1, A2, A3, A4, A5, A6, A7, A8 >
{
typedef storage8<A1, A2, A3, A4, A5, A6, A7, A8> inherited;
storage9( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, boost::arg<I> (*) () ): storage8<A1, A2, A3, A4, A5, A6, A7, A8>( a1, a2, a3, a4, a5, a6, a7, a8 ) {}
template<class V> void accept(V & v) const
{
inherited::accept(v);
}
static boost::arg<I> a9_() { return boost::arg<I>(); }
};
#endif
} // namespace _bi
} // namespace boost
#ifdef BOOST_MSVC
# pragma warning(default: 4512) // assignment operator could not be generated
# pragma warning(pop)
#endif
#endif // #ifndef BOOST_BIND_STORAGE_HPP_INCLUDED
//-----------------------------------------------------------------------------
// boost blank.hpp header file
// See http://www.boost.org for updates, documentation, and revision history.
//-----------------------------------------------------------------------------
//
// Copyright (c) 2003
// Eric Friedman
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_BLANK_HPP
#define BOOST_BLANK_HPP
#include "boost/blank_fwd.hpp"
#if !defined(BOOST_NO_IOSTREAM)
#include <iosfwd> // for std::basic_ostream forward declare
#include "boost/detail/templated_streams.hpp"
#endif // BOOST_NO_IOSTREAM
#include "boost/type_traits/integral_constant.hpp"
#include "boost/type_traits/is_empty.hpp"
#include "boost/type_traits/is_pod.hpp"
#include "boost/type_traits/is_stateless.hpp"
namespace boost {
struct blank
{
};
// type traits specializations
//
template <>
struct is_pod< blank >
: boost::true_type
{
};
template <>
struct is_empty< blank >
: boost::true_type
{
};
template <>
struct is_stateless< blank >
: boost::true_type
{
};
// relational operators
//
inline bool operator==(const blank&, const blank&)
{
return true;
}
inline bool operator<=(const blank&, const blank&)
{
return true;
}
inline bool operator>=(const blank&, const blank&)
{
return true;
}
inline bool operator!=(const blank&, const blank&)
{
return false;
}
inline bool operator<(const blank&, const blank&)
{
return false;
}
inline bool operator>(const blank&, const blank&)
{
return false;
}
// streaming support
//
#if !defined(BOOST_NO_IOSTREAM)
BOOST_TEMPLATED_STREAM_TEMPLATE(E,T)
inline BOOST_TEMPLATED_STREAM(ostream, E,T)& operator<<(
BOOST_TEMPLATED_STREAM(ostream, E,T)& out
, const blank&
)
{
// (output nothing)
return out;
}
#endif // BOOST_NO_IOSTREAM
} // namespace boost
#endif // BOOST_BLANK_HPP
//-----------------------------------------------------------------------------
// boost blank_fwd.hpp header file
// See http://www.boost.org for updates, documentation, and revision history.
//-----------------------------------------------------------------------------
//
// Copyright (c) 2003
// Eric Friedman
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_BLANK_FWD_HPP
#define BOOST_BLANK_FWD_HPP
namespace boost {
struct blank;
} // namespace boost
#endif // BOOST_BLANK_FWD_HPP
// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
// Use, modification and distribution are subject to the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt).
//
// See http://www.boost.org/libs/utility for most recent version including documentation.
// See boost/detail/call_traits.hpp
// for full copyright notices.
#ifndef BOOST_CALL_TRAITS_HPP
#define BOOST_CALL_TRAITS_HPP
#ifndef BOOST_CONFIG_HPP
#include <boost/config.hpp>
#endif
#include <boost/detail/call_traits.hpp>
#endif // BOOST_CALL_TRAITS_HPP
// boost cast.hpp header file
//
// (C) Copyright Antony Polukhin 2014.
//
// Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/conversion for Documentation.
// This is a DEPRECATED header file!
// Use <boost/polymorphic_cast.hpp> or <boost/numeric/conversion/cast.hpp> instead
#ifndef BOOST_CAST_HPP
#define BOOST_CAST_HPP
# include <boost/polymorphic_cast.hpp>
# include <boost/numeric/conversion/cast.hpp>
#endif // BOOST_CAST_HPP
// Boost cerrno.hpp header -------------------------------------------------//
// Copyright Beman Dawes 2005.
// Use, modification, and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See library home page at http://www.boost.org/libs/system
#ifndef BOOST_SYSTEM_CERRNO_HPP
#define BOOST_SYSTEM_CERRNO_HPP
#include <cerrno>
// supply errno values likely to be missing, particularly on Windows
#ifndef EAFNOSUPPORT
#define EAFNOSUPPORT 9901
#endif
#ifndef EADDRINUSE
#define EADDRINUSE 9902
#endif
#ifndef EADDRNOTAVAIL
#define EADDRNOTAVAIL 9903
#endif
#ifndef EISCONN
#define EISCONN 9904
#endif
#ifndef EBADMSG
#define EBADMSG 9905
#endif
#ifndef ECONNABORTED
#define ECONNABORTED 9906
#endif
#ifndef EALREADY
#define EALREADY 9907
#endif
#ifndef ECONNREFUSED
#define ECONNREFUSED 9908
#endif
#ifndef ECONNRESET
#define ECONNRESET 9909
#endif
#ifndef EDESTADDRREQ
#define EDESTADDRREQ 9910
#endif
#ifndef EHOSTUNREACH
#define EHOSTUNREACH 9911
#endif
#ifndef EIDRM
#define EIDRM 9912
#endif
#ifndef EMSGSIZE
#define EMSGSIZE 9913
#endif
#ifndef ENETDOWN
#define ENETDOWN 9914
#endif
#ifndef ENETRESET
#define ENETRESET 9915
#endif
#ifndef ENETUNREACH
#define ENETUNREACH 9916
#endif
#ifndef ENOBUFS
#define ENOBUFS 9917
#endif
#ifndef ENOLINK
#define ENOLINK 9918
#endif
#ifndef ENODATA
#define ENODATA 9919
#endif
#ifndef ENOMSG
#define ENOMSG 9920
#endif
#ifndef ENOPROTOOPT
#define ENOPROTOOPT 9921
#endif
#ifndef ENOSR
#define ENOSR 9922
#endif
#ifndef ENOTSOCK
#define ENOTSOCK 9923
#endif
#ifndef ENOSTR
#define ENOSTR 9924
#endif
#ifndef ENOTCONN
#define ENOTCONN 9925
#endif
#ifndef ENOTSUP
#define ENOTSUP 9926
#endif
#ifndef ECANCELED
#define ECANCELED 9927
#endif
#ifndef EINPROGRESS
#define EINPROGRESS 9928
#endif
#ifndef EOPNOTSUPP
#define EOPNOTSUPP 9929
#endif
#ifndef EWOULDBLOCK
#define EWOULDBLOCK 9930
#endif
#ifndef EOWNERDEAD
#define EOWNERDEAD 9931
#endif
#ifndef EPROTO
#define EPROTO 9932
#endif
#ifndef EPROTONOSUPPORT
#define EPROTONOSUPPORT 9933
#endif
#ifndef ENOTRECOVERABLE
#define ENOTRECOVERABLE 9934
#endif
#ifndef ETIME
#define ETIME 9935
#endif
#ifndef ETXTBSY
#define ETXTBSY 9936
#endif
#ifndef ETIMEDOUT
#define ETIMEDOUT 9938
#endif
#ifndef ELOOP
#define ELOOP 9939
#endif
#ifndef EOVERFLOW
#define EOVERFLOW 9940
#endif
#ifndef EPROTOTYPE
#define EPROTOTYPE 9941
#endif
#ifndef ENOSYS
#define ENOSYS 9942
#endif
#ifndef EINVAL
#define EINVAL 9943
#endif
#ifndef ERANGE
#define ERANGE 9944
#endif
#ifndef EILSEQ
#define EILSEQ 9945
#endif
// Windows Mobile doesn't appear to define these:
#ifndef E2BIG
#define E2BIG 9946
#endif
#ifndef EDOM
#define EDOM 9947
#endif
#ifndef EFAULT
#define EFAULT 9948
#endif
#ifndef EBADF
#define EBADF 9949
#endif
#ifndef EPIPE
#define EPIPE 9950
#endif
#ifndef EXDEV
#define EXDEV 9951
#endif
#ifndef EBUSY
#define EBUSY 9952
#endif
#ifndef ENOTEMPTY
#define ENOTEMPTY 9953
#endif
#ifndef ENOEXEC
#define ENOEXEC 9954
#endif
#ifndef EEXIST
#define EEXIST 9955
#endif
#ifndef EFBIG
#define EFBIG 9956
#endif
#ifndef ENAMETOOLONG
#define ENAMETOOLONG 9957
#endif
#ifndef ENOTTY
#define ENOTTY 9958
#endif
#ifndef EINTR
#define EINTR 9959
#endif
#ifndef ESPIPE
#define ESPIPE 9960
#endif
#ifndef EIO
#define EIO 9961
#endif
#ifndef EISDIR
#define EISDIR 9962
#endif
#ifndef ECHILD
#define ECHILD 9963
#endif
#ifndef ENOLCK
#define ENOLCK 9964
#endif
#ifndef ENOSPC
#define ENOSPC 9965
#endif
#ifndef ENXIO
#define ENXIO 9966
#endif
#ifndef ENODEV
#define ENODEV 9967
#endif
#ifndef ENOENT
#define ENOENT 9968
#endif
#ifndef ESRCH
#define ESRCH 9969
#endif
#ifndef ENOTDIR
#define ENOTDIR 9970
#endif
#ifndef ENOMEM
#define ENOMEM 9971
#endif
#ifndef EPERM
#define EPERM 9972
#endif
#ifndef EACCES
#define EACCES 9973
#endif
#ifndef EROFS
#define EROFS 9974
#endif
#ifndef EDEADLK
#define EDEADLK 9975
#endif
#ifndef EAGAIN
#define EAGAIN 9976
#endif
#ifndef ENFILE
#define ENFILE 9977
#endif
#ifndef EMFILE
#define EMFILE 9978
#endif
#ifndef EMLINK
#define EMLINK 9979
#endif
#endif // include guard
/*
* Copyright (c) 2014 Glen Fernandes
*
* Distributed under the Boost Software License, Version 1.0. (See
* accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt)
*/
#ifndef BOOST_CHECKED_DELETE_HPP
#define BOOST_CHECKED_DELETE_HPP
// The header file at this path is deprecated;
// use boost/core/checked_delete.hpp instead.
#include <boost/core/checked_delete.hpp>
#endif
// chrono.hpp --------------------------------------------------------------//
// Copyright 2009-2011 Vicente J. Botet Escriba
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
#ifndef BOOST_CHRONO_CHRONO_HPP
#define BOOST_CHRONO_CHRONO_HPP
#include <boost/chrono/duration.hpp>
#include <boost/chrono/time_point.hpp>
#include <boost/chrono/system_clocks.hpp>
#endif // BOOST_CHRONO_CHRONO_HPP
//
// (C) Copyright 2010-2011 Vicente J. Botet Escriba
// Use, modification and distribution are subject to the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt).
//
#ifndef BOOST_CHRONO_CLOCK_STRING_HPP
#define BOOST_CHRONO_CLOCK_STRING_HPP
#include <string>
namespace boost
{
namespace chrono
{
template<class Clock, class CharT>
struct clock_string;
} // chrono
} // boost
#endif // BOOST_CHRONO_CLOCK_STRING_HPP
// boost/chrono/config.hpp -------------------------------------------------//
// Copyright Beman Dawes 2003, 2006, 2008
// Copyright 2009-2011 Vicente J. Botet Escriba
// Copyright (c) Microsoft Corporation 2014
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org/libs/chrono for documentation.
#ifndef BOOST_CHRONO_CONFIG_HPP
#define BOOST_CHRONO_CONFIG_HPP
#include <boost/config.hpp>
#include <boost/predef.h>
#if !defined BOOST_CHRONO_VERSION
#define BOOST_CHRONO_VERSION 1
#else
#if BOOST_CHRONO_VERSION!=1 && BOOST_CHRONO_VERSION!=2
#error "BOOST_CHRONO_VERSION must be 1 or 2"
#endif
#endif
#if defined(BOOST_CHRONO_SOURCE) && !defined(BOOST_USE_WINDOWS_H)
#define BOOST_USE_WINDOWS_H
#endif
#if ! defined BOOST_CHRONO_PROVIDES_DATE_IO_FOR_SYSTEM_CLOCK_TIME_POINT \
&& ! defined BOOST_CHRONO_DONT_PROVIDE_DATE_IO_FOR_SYSTEM_CLOCK_TIME_POINT
# define BOOST_CHRONO_PROVIDES_DATE_IO_FOR_SYSTEM_CLOCK_TIME_POINT
#endif
// BOOST_CHRONO_POSIX_API, BOOST_CHRONO_MAC_API, or BOOST_CHRONO_WINDOWS_API
// can be defined by the user to specify which API should be used
#if defined(BOOST_CHRONO_WINDOWS_API)
# warning Boost.Chrono will use the Windows API
#elif defined(BOOST_CHRONO_MAC_API)
# warning Boost.Chrono will use the Mac API
#elif defined(BOOST_CHRONO_POSIX_API)
# warning Boost.Chrono will use the POSIX API
#endif
# if defined( BOOST_CHRONO_WINDOWS_API ) && defined( BOOST_CHRONO_POSIX_API )
# error both BOOST_CHRONO_WINDOWS_API and BOOST_CHRONO_POSIX_API are defined
# elif defined( BOOST_CHRONO_WINDOWS_API ) && defined( BOOST_CHRONO_MAC_API )
# error both BOOST_CHRONO_WINDOWS_API and BOOST_CHRONO_MAC_API are defined
# elif defined( BOOST_CHRONO_MAC_API ) && defined( BOOST_CHRONO_POSIX_API )
# error both BOOST_CHRONO_MAC_API and BOOST_CHRONO_POSIX_API are defined
# elif !defined( BOOST_CHRONO_WINDOWS_API ) && !defined( BOOST_CHRONO_MAC_API ) && !defined( BOOST_CHRONO_POSIX_API )
# if (defined(_WIN32) || defined(__WIN32__) || defined(WIN32))
# define BOOST_CHRONO_WINDOWS_API
# elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)
# define BOOST_CHRONO_MAC_API
# else
# define BOOST_CHRONO_POSIX_API
# endif
# endif
# if defined( BOOST_CHRONO_WINDOWS_API )
# ifndef UNDER_CE
# define BOOST_CHRONO_HAS_PROCESS_CLOCKS
# endif
# define BOOST_CHRONO_HAS_CLOCK_STEADY
# if BOOST_PLAT_WINDOWS_DESKTOP
# define BOOST_CHRONO_HAS_THREAD_CLOCK
# endif
# define BOOST_CHRONO_THREAD_CLOCK_IS_STEADY true
# endif
# if defined( BOOST_CHRONO_MAC_API )
# define BOOST_CHRONO_HAS_PROCESS_CLOCKS
# define BOOST_CHRONO_HAS_CLOCK_STEADY
# define BOOST_CHRONO_HAS_THREAD_CLOCK
# define BOOST_CHRONO_THREAD_CLOCK_IS_STEADY true
# endif
# if defined( BOOST_CHRONO_POSIX_API )
# define BOOST_CHRONO_HAS_PROCESS_CLOCKS
# include <time.h> //to check for CLOCK_REALTIME and CLOCK_MONOTONIC and _POSIX_THREAD_CPUTIME
# if defined(CLOCK_MONOTONIC)
# define BOOST_CHRONO_HAS_CLOCK_STEADY
# endif
# if defined(_POSIX_THREAD_CPUTIME) && !defined(BOOST_DISABLE_THREADS)
# define BOOST_CHRONO_HAS_THREAD_CLOCK
# define BOOST_CHRONO_THREAD_CLOCK_IS_STEADY true
# endif
# if defined(CLOCK_THREAD_CPUTIME_ID) && !defined(BOOST_DISABLE_THREADS)
# define BOOST_CHRONO_HAS_THREAD_CLOCK
# define BOOST_CHRONO_THREAD_CLOCK_IS_STEADY true
# endif
# if defined(sun) || defined(__sun)
# undef BOOST_CHRONO_HAS_THREAD_CLOCK
# undef BOOST_CHRONO_THREAD_CLOCK_IS_STEADY
# endif
# if (defined(__HP_aCC) || defined(__GNUC__)) && defined(__hpux)
# undef BOOST_CHRONO_HAS_THREAD_CLOCK
# undef BOOST_CHRONO_THREAD_CLOCK_IS_STEADY
# endif
# if defined(__VXWORKS__)
# undef BOOST_CHRONO_HAS_PROCESS_CLOCKS
# endif
# endif
#if defined(BOOST_CHRONO_THREAD_DISABLED) && defined(BOOST_CHRONO_HAS_THREAD_CLOCK)
#undef BOOST_CHRONO_HAS_THREAD_CLOCK
#undef BOOST_CHRONO_THREAD_CLOCK_IS_STEADY
#endif
// unicode support ------------------------------//
#if defined(BOOST_NO_CXX11_UNICODE_LITERALS) || defined(BOOST_NO_CXX11_CHAR16_T) || defined(BOOST_NO_CXX11_CHAR32_T)
//~ #define BOOST_CHRONO_HAS_UNICODE_SUPPORT
#else
#define BOOST_CHRONO_HAS_UNICODE_SUPPORT 1
#endif
#ifndef BOOST_CHRONO_LIB_CONSTEXPR
#if defined( BOOST_NO_CXX11_NUMERIC_LIMITS )
#define BOOST_CHRONO_LIB_CONSTEXPR
#elif defined(_LIBCPP_VERSION) && !defined(_LIBCPP_CONSTEXPR)
#define BOOST_CHRONO_LIB_CONSTEXPR
#else
#define BOOST_CHRONO_LIB_CONSTEXPR BOOST_CONSTEXPR
#endif
#endif
#if defined( BOOST_NO_CXX11_NUMERIC_LIMITS )
# define BOOST_CHRONO_LIB_NOEXCEPT_OR_THROW throw()
#else
#ifdef BOOST_NO_CXX11_NOEXCEPT
# define BOOST_CHRONO_LIB_NOEXCEPT_OR_THROW throw()
#else
# define BOOST_CHRONO_LIB_NOEXCEPT_OR_THROW noexcept
#endif
#endif
#if defined BOOST_CHRONO_PROVIDE_HYBRID_ERROR_HANDLING \
&& defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
#error "BOOST_CHRONO_PROVIDE_HYBRID_ERROR_HANDLING && BOOST_CHRONO_PROVIDE_HYBRID_ERROR_HANDLING defined"
#endif
#if defined BOOST_CHRONO_PROVIDES_DEPRECATED_IO_SINCE_V2_0_0 \
&& defined BOOST_CHRONO_DONT_PROVIDES_DEPRECATED_IO_SINCE_V2_0_0
#error "BOOST_CHRONO_PROVIDES_DEPRECATED_IO_SINCE_V2_0_0 && BOOST_CHRONO_DONT_PROVIDES_DEPRECATED_IO_SINCE_V2_0_0 defined"
#endif
#if ! defined BOOST_CHRONO_PROVIDE_HYBRID_ERROR_HANDLING \
&& ! defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
#define BOOST_CHRONO_PROVIDE_HYBRID_ERROR_HANDLING
#endif
#if (BOOST_CHRONO_VERSION == 2)
#if ! defined BOOST_CHRONO_PROVIDES_DEPRECATED_IO_SINCE_V2_0_0 \
&& ! defined BOOST_CHRONO_DONT_PROVIDES_DEPRECATED_IO_SINCE_V2_0_0
#define BOOST_CHRONO_DONT_PROVIDES_DEPRECATED_IO_SINCE_V2_0_0
#endif
#endif
#ifdef BOOST_CHRONO_HEADER_ONLY
#define BOOST_CHRONO_INLINE inline
#define BOOST_CHRONO_STATIC inline
#define BOOST_CHRONO_DECL
#else
#define BOOST_CHRONO_INLINE
#define BOOST_CHRONO_STATIC static
// enable dynamic linking on Windows ---------------------------------------//
// we need to import/export our code only if the user has specifically
// asked for it by defining either BOOST_ALL_DYN_LINK if they want all boost
// libraries to be dynamically linked, or BOOST_CHRONO_DYN_LINK
// if they want just this one to be dynamically liked:
#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_CHRONO_DYN_LINK)
// export if this is our own source, otherwise import:
#ifdef BOOST_CHRONO_SOURCE
# define BOOST_CHRONO_DECL BOOST_SYMBOL_EXPORT
#else
# define BOOST_CHRONO_DECL BOOST_SYMBOL_IMPORT
#endif // BOOST_CHRONO_SOURCE
#endif // DYN_LINK
//
// if BOOST_CHRONO_DECL isn't defined yet define it now:
#ifndef BOOST_CHRONO_DECL
#define BOOST_CHRONO_DECL
#endif
// enable automatic library variant selection ------------------------------//
#if !defined(BOOST_CHRONO_SOURCE) && !defined(BOOST_ALL_NO_LIB) && !defined(BOOST_CHRONO_NO_LIB)
//
// Set the name of our library; this will get undef'ed by auto_link.hpp
// once it's done with it:
//
#define BOOST_LIB_NAME boost_chrono
//
// If we're importing code from a dll, then tell auto_link.hpp about it:
//
#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_CHRONO_DYN_LINK)
# define BOOST_DYN_LINK
#endif
//
// And include the header that does the work:
//
#include <boost/config/auto_link.hpp>
#endif // auto-linking disabled
#endif // BOOST_CHRONO_HEADER_ONLY
#endif // BOOST_CHRONO_CONFIG_HPP
// chrono.cpp --------------------------------------------------------------//
// Copyright Beman Dawes 2008
// Copyright Vicente J. Botet Escriba 2009
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
#ifndef BOOST_CHRONO_DETAIL_INLINED_CHRONO_HPP
#define BOOST_CHRONO_DETAIL_INLINED_CHRONO_HPP
#include <boost/version.hpp>
#include <boost/chrono/chrono.hpp>
#if defined BOOST_CHRONO_PROVIDE_HYBRID_ERROR_HANDLING
#include <boost/system/system_error.hpp>
#endif
#include <boost/throw_exception.hpp>
#include <boost/chrono/detail/system.hpp>
//----------------------------------------------------------------------------//
// //
// Platform-specific Implementations //
// //
//----------------------------------------------------------------------------//
//----------------------------------------------------------------------------//
// Windows //
//----------------------------------------------------------------------------//
#if defined(BOOST_CHRONO_WINDOWS_API)
#include <boost/chrono/detail/inlined/win/chrono.hpp>
//----------------------------------------------------------------------------//
// Mac //
//----------------------------------------------------------------------------//
#elif defined(BOOST_CHRONO_MAC_API)
#include <boost/chrono/detail/inlined/mac/chrono.hpp>
//----------------------------------------------------------------------------//
// POSIX //
//----------------------------------------------------------------------------//
#elif defined(BOOST_CHRONO_POSIX_API)
#include <boost/chrono/detail/inlined/posix/chrono.hpp>
#endif // POSIX
#endif
// mac/chrono.cpp --------------------------------------------------------------//
// Copyright Beman Dawes 2008
// Copyright 2009-2010 Vicente J. Botet Escriba
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
//----------------------------------------------------------------------------//
// Mac //
//----------------------------------------------------------------------------//
#include <sys/time.h> //for gettimeofday and timeval
#include <mach/mach_time.h> // mach_absolute_time, mach_timebase_info_data_t
#include <boost/assert.hpp>
namespace boost
{
namespace chrono
{
// system_clock
// gettimeofday is the most precise "system time" available on this platform.
// It returns the number of microseconds since New Years 1970 in a struct called timeval
// which has a field for seconds and a field for microseconds.
// Fill in the timeval and then convert that to the time_point
system_clock::time_point
system_clock::now() BOOST_NOEXCEPT
{
timeval tv;
gettimeofday(&tv, 0);
return time_point(seconds(tv.tv_sec) + microseconds(tv.tv_usec));
}
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
system_clock::time_point
system_clock::now(system::error_code & ec)
{
timeval tv;
gettimeofday(&tv, 0);
if (!::boost::chrono::is_throws(ec))
{
ec.clear();
}
return time_point(seconds(tv.tv_sec) + microseconds(tv.tv_usec));
}
#endif
// Take advantage of the fact that on this platform time_t is nothing but
// an integral count of seconds since New Years 1970 (same epoch as timeval).
// Just get the duration out of the time_point and truncate it to seconds.
time_t
system_clock::to_time_t(const time_point& t) BOOST_NOEXCEPT
{
return time_t(duration_cast<seconds>(t.time_since_epoch()).count());
}
// Just turn the time_t into a count of seconds and construct a time_point with it.
system_clock::time_point
system_clock::from_time_t(time_t t) BOOST_NOEXCEPT
{
return system_clock::time_point(seconds(t));
}
namespace chrono_detail
{
// steady_clock
// Note, in this implementation steady_clock and high_resolution_clock
// are the same clock. They are both based on mach_absolute_time().
// mach_absolute_time() * MachInfo.numer / MachInfo.denom is the number of
// nanoseconds since the computer booted up. MachInfo.numer and MachInfo.denom
// are run time constants supplied by the OS. This clock has no relationship
// to the Gregorian calendar. It's main use is as a high resolution timer.
// MachInfo.numer / MachInfo.denom is often 1 on the latest equipment. Specialize
// for that case as an optimization.
BOOST_CHRONO_STATIC
steady_clock::rep
steady_simplified()
{
return mach_absolute_time();
}
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
BOOST_CHRONO_STATIC
steady_clock::rep
steady_simplified_ec(system::error_code & ec)
{
if (!::boost::chrono::is_throws(ec))
{
ec.clear();
}
return mach_absolute_time();
}
#endif
BOOST_CHRONO_STATIC
double
compute_steady_factor(kern_return_t& err)
{
mach_timebase_info_data_t MachInfo;
err = mach_timebase_info(&MachInfo);
if ( err != 0 ) {
return 0;
}
return static_cast<double>(MachInfo.numer) / MachInfo.denom;
}
BOOST_CHRONO_STATIC
steady_clock::rep
steady_full()
{
kern_return_t err;
const double factor = chrono_detail::compute_steady_factor(err);
if (err != 0)
{
BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
}
return static_cast<steady_clock::rep>(mach_absolute_time() * factor);
}
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
BOOST_CHRONO_STATIC
steady_clock::rep
steady_full_ec(system::error_code & ec)
{
kern_return_t err;
const double factor = chrono_detail::compute_steady_factor(err);
if (err != 0)
{
if (::boost::chrono::is_throws(ec))
{
boost::throw_exception(
system::system_error(
err,
::boost::system::system_category(),
"chrono::steady_clock" ));
}
else
{
ec.assign( errno, ::boost::system::system_category() );
return steady_clock::rep();
}
}
if (!::boost::chrono::is_throws(ec))
{
ec.clear();
}
return static_cast<steady_clock::rep>(mach_absolute_time() * factor);
}
#endif
typedef steady_clock::rep (*FP)();
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
typedef steady_clock::rep (*FP_ec)(system::error_code &);
#endif
BOOST_CHRONO_STATIC
FP
init_steady_clock(kern_return_t & err)
{
mach_timebase_info_data_t MachInfo;
err = mach_timebase_info(&MachInfo);
if ( err != 0 )
{
return 0;
}
if (MachInfo.numer == MachInfo.denom)
{
return &chrono_detail::steady_simplified;
}
return &chrono_detail::steady_full;
}
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
BOOST_CHRONO_STATIC
FP_ec
init_steady_clock_ec(kern_return_t & err)
{
mach_timebase_info_data_t MachInfo;
err = mach_timebase_info(&MachInfo);
if ( err != 0 )
{
return 0;
}
if (MachInfo.numer == MachInfo.denom)
{
return &chrono_detail::steady_simplified_ec;
}
return &chrono_detail::steady_full_ec;
}
#endif
}
steady_clock::time_point
steady_clock::now() BOOST_NOEXCEPT
{
kern_return_t err;
chrono_detail::FP fp = chrono_detail::init_steady_clock(err);
if ( err != 0 )
{
BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
}
return time_point(duration(fp()));
}
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
steady_clock::time_point
steady_clock::now(system::error_code & ec)
{
kern_return_t err;
chrono_detail::FP_ec fp = chrono_detail::init_steady_clock_ec(err);
if ( err != 0 )
{
if (::boost::chrono::is_throws(ec))
{
boost::throw_exception(
system::system_error(
err,
::boost::system::system_category(),
"chrono::steady_clock" ));
}
else
{
ec.assign( err, ::boost::system::system_category() );
return time_point();
}
}
if (!::boost::chrono::is_throws(ec))
{
ec.clear();
}
return time_point(duration(fp(ec)));
}
#endif
} // namespace chrono
} // namespace boost
// boost process_cpu_clocks.cpp -----------------------------------------------------------//
// Copyright Beman Dawes 1994, 2006, 2008
// Copyright Vicente J. Botet Escriba 2009
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
// See http://www.boost.org/libs/chrono for documentation.
//--------------------------------------------------------------------------------------//
#include <boost/chrono/config.hpp>
#include <boost/chrono/process_cpu_clocks.hpp>
#include <boost/assert.hpp>
#include <sys/time.h> //for gettimeofday and timeval
#include <sys/times.h> //for times
# include <unistd.h>
namespace boost
{
namespace chrono
{
namespace chrono_detail
{
inline long tick_factor() // multiplier to convert ticks
// to nanoseconds; -1 if unknown
{
long factor = 0;
if (!factor)
{
if ((factor = ::sysconf(_SC_CLK_TCK)) <= 0)
factor = -1;
else
{
BOOST_ASSERT(factor <= 1000000000l); // doesn't handle large ticks
factor = 1000000000l / factor; // compute factor
if (!factor)
factor = -1;
}
}
return factor;
}
}
process_real_cpu_clock::time_point process_real_cpu_clock::now() BOOST_NOEXCEPT
{
#if 1
tms tm;
clock_t c = ::times(&tm);
if (c == clock_t(-1)) // error
{
BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
} else
{
long factor = chrono_detail::tick_factor();
if (factor != -1)
{
return time_point(nanoseconds(c * factor));
} else
{
BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
}
}
return time_point();
#else
clock_t c = ::clock();
if (c == clock_t(-1)) // error
{
BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
} else
{
long factor = chrono_detail::tick_factor();
if (factor != -1)
{
return time_point(nanoseconds(c * factor));
} else
{
BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
}
}
return time_point();
#endif
}
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
process_real_cpu_clock::time_point process_real_cpu_clock::now(system::error_code & ec)
{
#if 1
tms tm;
clock_t c = ::times(&tm);
if (c == clock_t(-1)) // error
{
if (::boost::chrono::is_throws(ec))
{
boost::throw_exception(system::system_error(errno, ::boost::system::system_category(), "chrono::process_real_cpu_clock"));
} else
{
ec.assign(errno, ::boost::system::system_category());
return time_point();
}
} else
{
long factor = chrono_detail::tick_factor();
if (factor != -1)
{
if (!::boost::chrono::is_throws(ec))
{
ec.clear();
}
return time_point(nanoseconds(c * factor));
} else
{
if (::boost::chrono::is_throws(ec))
{
boost::throw_exception(system::system_error(errno, ::boost::system::system_category(), "chrono::process_real_cpu_clock"));
} else
{
ec.assign(errno, ::boost::system::system_category());
return time_point();
}
}
}
#else
clock_t c = ::clock();
if (c == clock_t(-1)) // error
{
if (::boost::chrono::is_throws(ec))
{
boost::throw_exception(system::system_error(errno, ::boost::system::system_category(), "chrono::process_real_cpu_clock"));
} else
{
ec.assign(errno, ::boost::system::system_category());
return time_point();
}
} else
{
long factor = chrono_detail::tick_factor();
if (factor != -1)
{
if (!::boost::chrono::is_throws(ec))
{
ec.clear();
}
return time_point(nanoseconds(c * factor));
} else
{
if (::boost::chrono::is_throws(ec))
{
boost::throw_exception(system::system_error(errno, ::boost::system::system_category(), "chrono::process_real_cpu_clock"));
} else
{
ec.assign(errno, ::boost::system::system_category());
return time_point();
}
}
}
#endif
}
#endif
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
process_user_cpu_clock::time_point process_user_cpu_clock::now(system::error_code & ec)
{
tms tm;
clock_t c = ::times(&tm);
if (c == clock_t(-1)) // error
{
if (::boost::chrono::is_throws(ec))
{
boost::throw_exception(system::system_error(errno, ::boost::system::system_category(), "chrono::process_user_cpu_clock"));
} else
{
ec.assign(errno, ::boost::system::system_category());
return time_point();
}
} else
{
long factor = chrono_detail::tick_factor();
if (factor != -1)
{
if (!::boost::chrono::is_throws(ec))
{
ec.clear();
}
return time_point(nanoseconds((tm.tms_utime + tm.tms_cutime) * factor));
} else
{
if (::boost::chrono::is_throws(ec))
{
boost::throw_exception(system::system_error(errno, ::boost::system::system_category(), "chrono::process_user_cpu_clock"));
} else
{
ec.assign(errno, ::boost::system::system_category());
return time_point();
}
}
}
}
#endif
process_user_cpu_clock::time_point process_user_cpu_clock::now() BOOST_NOEXCEPT
{
tms tm;
clock_t c = ::times(&tm);
if (c == clock_t(-1)) // error
{
BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
} else
{
long factor = chrono_detail::tick_factor();
if (factor != -1)
{
return time_point(nanoseconds((tm.tms_utime + tm.tms_cutime)
* factor));
} else
{
BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
}
}
return time_point();
}
process_system_cpu_clock::time_point process_system_cpu_clock::now() BOOST_NOEXCEPT
{
tms tm;
clock_t c = ::times(&tm);
if (c == clock_t(-1)) // error
{
BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
} else
{
long factor = chrono_detail::tick_factor();
if (factor != -1)
{
return time_point(nanoseconds((tm.tms_stime + tm.tms_cstime)
* factor));
} else
{
BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
}
}
return time_point();
}
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
process_system_cpu_clock::time_point process_system_cpu_clock::now(system::error_code & ec)
{
tms tm;
clock_t c = ::times(&tm);
if (c == clock_t(-1)) // error
{
if (::boost::chrono::is_throws(ec))
{
boost::throw_exception(system::system_error(errno, ::boost::system::system_category(), "chrono::process_system_cpu_clock"));
} else
{
ec.assign(errno, ::boost::system::system_category());
return time_point();
}
} else
{
long factor = chrono_detail::tick_factor();
if (factor != -1)
{
if (!::boost::chrono::is_throws(ec))
{
ec.clear();
}
return time_point(nanoseconds((tm.tms_stime + tm.tms_cstime) * factor));
} else
{
if (::boost::chrono::is_throws(ec))
{
boost::throw_exception(system::system_error(errno, ::boost::system::system_category(), "chrono::process_system_cpu_clock"));
} else
{
ec.assign(errno, ::boost::system::system_category());
return time_point();
}
}
}
}
#endif
process_cpu_clock::time_point process_cpu_clock::now() BOOST_NOEXCEPT
{
tms tm;
clock_t c = ::times(&tm);
if (c == clock_t(-1)) // error
{
BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
} else
{
long factor = chrono_detail::tick_factor();
if (factor != -1)
{
time_point::rep
r(c * factor, (tm.tms_utime + tm.tms_cutime) * factor, (tm.tms_stime
+ tm.tms_cstime) * factor);
return time_point(duration(r));
} else
{
BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
}
}
return time_point();
}
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
process_cpu_clock::time_point process_cpu_clock::now(system::error_code & ec)
{
tms tm;
clock_t c = ::times(&tm);
if (c == clock_t(-1)) // error
{
if (::boost::chrono::is_throws(ec))
{
boost::throw_exception(system::system_error(errno, ::boost::system::system_category(), "chrono::process_clock"));
} else
{
ec.assign(errno, ::boost::system::system_category());
return time_point();
}
} else
{
long factor = chrono_detail::tick_factor();
if (factor != -1)
{
time_point::rep
r(c * factor, (tm.tms_utime + tm.tms_cutime) * factor, (tm.tms_stime
+ tm.tms_cstime) * factor);
return time_point(duration(r));
} else
{
if (::boost::chrono::is_throws(ec))
{
boost::throw_exception(system::system_error(errno, ::boost::system::system_category(), "chrono::process_clock"));
} else
{
ec.assign(errno, ::boost::system::system_category());
return time_point();
}
}
}
}
#endif
}
}
// boost thread_clock.cpp -----------------------------------------------------------//
// Copyright Beman Dawes 1994, 2006, 2008
// Copyright Vicente J. Botet Escriba 2009-2011
// Copyright Christopher Brown 2013
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
// See http://www.boost.org/libs/chrono for documentation.
//--------------------------------------------------------------------------------------//
#include <boost/chrono/config.hpp>
#include <boost/chrono/thread_clock.hpp>
#include <cassert>
#include <boost/assert.hpp>
# include <pthread.h>
# include <mach/thread_act.h>
namespace boost { namespace chrono {
thread_clock::time_point thread_clock::now( ) BOOST_NOEXCEPT
{
// get the thread port (borrowing pthread's reference)
mach_port_t port = pthread_mach_thread_np(pthread_self());
// get the thread info
thread_basic_info_data_t info;
mach_msg_type_number_t count = THREAD_BASIC_INFO_COUNT;
if ( thread_info(port, THREAD_BASIC_INFO, (thread_info_t)&info, &count) != KERN_SUCCESS )
{
BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
return time_point();
}
// convert to nanoseconds
duration user = duration(
static_cast<thread_clock::rep>( info.user_time.seconds ) * 1000000000
+ static_cast<thread_clock::rep>(info.user_time.microseconds ) * 1000);
duration system = duration(
static_cast<thread_clock::rep>( info.system_time.seconds ) * 1000000000
+ static_cast<thread_clock::rep>( info.system_time.microseconds ) * 1000);
return time_point( user + system );
}
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
thread_clock::time_point thread_clock::now( system::error_code & ec )
{
// get the thread port (borrowing pthread's reference)
mach_port_t port = pthread_mach_thread_np(pthread_self());
// get the thread info
thread_basic_info_data_t info;
mach_msg_type_number_t count = THREAD_BASIC_INFO_COUNT;
if ( thread_info(port, THREAD_BASIC_INFO, (thread_info_t)&info, &count) != KERN_SUCCESS )
{
if (::boost::chrono::is_throws(ec))
{
boost::throw_exception(
system::system_error(
EINVAL,
::boost::system::system_category(),
"chrono::thread_clock" ));
}
else
{
ec.assign( errno, ::boost::system::system_category() );
return time_point();
}
}
if (!::boost::chrono::is_throws(ec))
{
ec.clear();
}
// convert to nanoseconds
duration user = duration(
static_cast<thread_clock::rep>( info.user_time.seconds ) * 1000000000
+ static_cast<thread_clock::rep>(info.user_time.microseconds ) * 1000);
duration system = duration(
static_cast<thread_clock::rep>( info.system_time.seconds ) * 1000000000
+ static_cast<thread_clock::rep>( info.system_time.microseconds ) * 1000);
return time_point( user + system );
}
#endif
} }
// posix/chrono.cpp --------------------------------------------------------------//
// Copyright Beman Dawes 2008
// Copyright Vicente J. Botet Escriba 2009
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
//----------------------------------------------------------------------------//
// POSIX //
//----------------------------------------------------------------------------//
#include <time.h> // for clock_gettime
#include <boost/assert.hpp>
#include <boost/predef/os.h>
namespace boost
{
namespace chrono
{
system_clock::time_point system_clock::now() BOOST_NOEXCEPT
{
timespec ts;
if ( ::clock_gettime( CLOCK_REALTIME, &ts ) )
{
BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
}
return time_point(duration(
static_cast<system_clock::rep>( ts.tv_sec ) * 1000000000 + ts.tv_nsec));
}
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
system_clock::time_point system_clock::now(system::error_code & ec)
{
timespec ts;
if ( ::clock_gettime( CLOCK_REALTIME, &ts ) )
{
if (::boost::chrono::is_throws(ec))
{
boost::throw_exception(
system::system_error(
errno,
::boost::system::system_category(),
"chrono::system_clock" ));
}
else
{
ec.assign( errno, ::boost::system::system_category() );
return time_point();
}
}
if (!::boost::chrono::is_throws(ec))
{
ec.clear();
}
return time_point(duration(
static_cast<system_clock::rep>( ts.tv_sec ) * 1000000000 + ts.tv_nsec));
}
#endif
std::time_t system_clock::to_time_t(const system_clock::time_point& t) BOOST_NOEXCEPT
{
return static_cast<std::time_t>( t.time_since_epoch().count() / 1000000000 );
}
system_clock::time_point system_clock::from_time_t(std::time_t t) BOOST_NOEXCEPT
{
return time_point(duration(static_cast<system_clock::rep>(t) * 1000000000));
}
#ifdef BOOST_CHRONO_HAS_CLOCK_STEADY
steady_clock::time_point steady_clock::now() BOOST_NOEXCEPT
{
timespec ts;
#if BOOST_OS_CYGWIN
// lack of thread safety in high resolution timer initialization
// can lead to a timespec of zero without an error; was reported
// to the cygwin mailing list and can be removed once fixed
do
{
#endif
if ( ::clock_gettime( CLOCK_MONOTONIC, &ts ) )
{
BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
}
#if BOOST_OS_CYGWIN
} while (ts.tv_sec == 0 && ts.tv_nsec == 0);
#endif
return time_point(duration(
static_cast<steady_clock::rep>( ts.tv_sec ) * 1000000000 + ts.tv_nsec));
}
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
steady_clock::time_point steady_clock::now(system::error_code & ec)
{
timespec ts;
#if BOOST_OS_CYGWIN
// lack of thread safety in high resolution timer initialization
// can lead to a timespec of zero without an error; was reported
// to the cygwin mailing list and can be removed once fixed
do
{
#endif
if ( ::clock_gettime( CLOCK_MONOTONIC, &ts ) )
{
if (::boost::chrono::is_throws(ec))
{
boost::throw_exception(
system::system_error(
errno,
::boost::system::system_category(),
"chrono::steady_clock" ));
}
else
{
ec.assign( errno, ::boost::system::system_category() );
return time_point();
}
}
#if BOOST_OS_CYGWIN
} while (ts.tv_sec == 0 && ts.tv_nsec == 0);
#endif
if (!::boost::chrono::is_throws(ec))
{
ec.clear();
}
return time_point(duration(
static_cast<steady_clock::rep>( ts.tv_sec ) * 1000000000 + ts.tv_nsec));
}
#endif
#endif
} // namespace chrono
} // namespace boost
// boost process_cpu_clocks.cpp -----------------------------------------------------------//
// Copyright Beman Dawes 1994, 2006, 2008
// Copyright Vicente J. Botet Escriba 2009
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
// See http://www.boost.org/libs/chrono for documentation.
//--------------------------------------------------------------------------------------//
#include <boost/chrono/config.hpp>
#include <boost/chrono/process_cpu_clocks.hpp>
#include <boost/assert.hpp>
#include <sys/times.h>
#include <unistd.h>
#include <time.h> // for clock_gettime
namespace boost { namespace chrono {
namespace chrono_detail
{
inline nanoseconds::rep tick_factor() // multiplier to convert ticks
// to nanoseconds; -1 if unknown
{
long factor = 0;
if ( !factor )
{
if ( (factor = ::sysconf( _SC_CLK_TCK )) <= 0 )
factor = -1;
else
{
BOOST_ASSERT( factor <= 1000000000l ); // doesn't handle large ticks
factor = 1000000000l / factor; // compute factor
if ( !factor ) factor = -1;
}
}
return factor;
}
}
process_real_cpu_clock::time_point process_real_cpu_clock::now() BOOST_NOEXCEPT
{
tms tm;
clock_t c = ::times( &tm );
if ( c == clock_t(-1) ) // error
{
BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
}
else
{
if ( chrono_detail::tick_factor() != -1 )
{
return time_point(
nanoseconds(c*chrono_detail::tick_factor()));
}
else
{
BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
}
}
return time_point();
}
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
process_real_cpu_clock::time_point process_real_cpu_clock::now(
system::error_code & ec)
{
tms tm;
clock_t c = ::times( &tm );
if ( c == clock_t(-1) ) // error
{
if (::boost::chrono::is_throws(ec))
{
boost::throw_exception(
system::system_error(
errno,
::boost::system::system_category(),
"chrono::process_real_cpu_clock" ));
}
else
{
ec.assign( errno, ::boost::system::system_category() );
return time_point();
}
}
else
{
if ( chrono_detail::tick_factor() != -1 )
{
if (!::boost::chrono::is_throws(ec))
{
ec.clear();
}
return time_point(
nanoseconds(c*chrono_detail::tick_factor()));
}
else
{
if (::boost::chrono::is_throws(ec))
{
boost::throw_exception(
system::system_error(
errno,
::boost::system::system_category(),
"chrono::process_real_cpu_clock" ));
}
else
{
ec.assign( errno, ::boost::system::system_category() );
return time_point();
}
}
}
}
#endif
process_user_cpu_clock::time_point process_user_cpu_clock::now() BOOST_NOEXCEPT
{
tms tm;
clock_t c = ::times( &tm );
if ( c == clock_t(-1) ) // error
{
BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
}
else
{
if ( chrono_detail::tick_factor() != -1 )
{
return time_point(
nanoseconds((tm.tms_utime + tm.tms_cutime)*chrono_detail::tick_factor()));
}
else
{
BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
}
}
return time_point();
}
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
process_user_cpu_clock::time_point process_user_cpu_clock::now(
system::error_code & ec)
{
tms tm;
clock_t c = ::times( &tm );
if ( c == clock_t(-1) ) // error
{
if (::boost::chrono::is_throws(ec))
{
boost::throw_exception(
system::system_error(
errno,
::boost::system::system_category(),
"chrono::process_user_cpu_clock" ));
}
else
{
ec.assign( errno, ::boost::system::system_category() );
return time_point();
}
}
else
{
if ( chrono_detail::tick_factor() != -1 )
{
if (!::boost::chrono::is_throws(ec))
{
ec.clear();
}
return time_point(
nanoseconds((tm.tms_utime + tm.tms_cutime)*chrono_detail::tick_factor()));
}
else
{
if (::boost::chrono::is_throws(ec))
{
boost::throw_exception(
system::system_error(
errno,
::boost::system::system_category(),
"chrono::process_user_cpu_clock" ));
}
else
{
ec.assign( errno, ::boost::system::system_category() );
return time_point();
}
}
}
}
#endif
process_system_cpu_clock::time_point process_system_cpu_clock::now() BOOST_NOEXCEPT
{
tms tm;
clock_t c = ::times( &tm );
if ( c == clock_t(-1) ) // error
{
BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
return time_point();
}
else
{
if ( chrono_detail::tick_factor() != -1 )
{
return time_point(
nanoseconds((tm.tms_stime + tm.tms_cstime)*chrono_detail::tick_factor()));
}
else
{
BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
return time_point();
}
}
}
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
process_system_cpu_clock::time_point process_system_cpu_clock::now(
system::error_code & ec)
{
tms tm;
clock_t c = ::times( &tm );
if ( c == clock_t(-1) ) // error
{
if (::boost::chrono::is_throws(ec))
{
boost::throw_exception(
system::system_error(
errno,
::boost::system::system_category(),
"chrono::process_system_cpu_clock" ));
}
else
{
ec.assign( errno, ::boost::system::system_category() );
return time_point();
}
}
else
{
if ( chrono_detail::tick_factor() != -1 )
{
if (!::boost::chrono::is_throws(ec))
{
ec.clear();
}
return time_point(
nanoseconds((tm.tms_stime + tm.tms_cstime)*chrono_detail::tick_factor()));
}
else
{
if (::boost::chrono::is_throws(ec))
{
boost::throw_exception(
system::system_error(
errno,
::boost::system::system_category(),
"chrono::process_system_cpu_clock" ));
}
else
{
ec.assign( errno, ::boost::system::system_category() );
return time_point();
}
}
}
}
#endif
process_cpu_clock::time_point process_cpu_clock::now() BOOST_NOEXCEPT
{
tms tm;
clock_t c = ::times( &tm );
if ( c == clock_t(-1) ) // error
{
BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
}
else
{
nanoseconds::rep factor = chrono_detail::tick_factor();
if ( factor != -1 )
{
time_point::rep r(
c*factor,
(tm.tms_utime + tm.tms_cutime)*factor,
(tm.tms_stime + tm.tms_cstime)*factor);
return time_point(duration(r));
}
else
{
BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
}
}
return time_point();
}
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
process_cpu_clock::time_point process_cpu_clock::now(
system::error_code & ec )
{
tms tm;
clock_t c = ::times( &tm );
if ( c == clock_t(-1) ) // error
{
if (::boost::chrono::is_throws(ec))
{
boost::throw_exception(
system::system_error(
errno,
::boost::system::system_category(),
"chrono::process_clock" ));
}
else
{
ec.assign( errno, ::boost::system::system_category() );
return time_point();
}
}
else
{
if ( chrono_detail::tick_factor() != -1 )
{
time_point::rep r(
c*chrono_detail::tick_factor(),
(tm.tms_utime + tm.tms_cutime)*chrono_detail::tick_factor(),
(tm.tms_stime + tm.tms_cstime)*chrono_detail::tick_factor());
return time_point(duration(r));
}
else
{
if (::boost::chrono::is_throws(ec))
{
boost::throw_exception(
system::system_error(
errno,
::boost::system::system_category(),
"chrono::process_clock" ));
}
else
{
ec.assign( errno, ::boost::system::system_category() );
return time_point();
}
}
}
}
#endif
} }
// boost thread_clock.cpp -----------------------------------------------------------//
// Copyright Beman Dawes 1994, 2006, 2008
// Copyright Vicente J. Botet Escriba 2009-2011
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
// See http://www.boost.org/libs/chrono for documentation.
//--------------------------------------------------------------------------------------//
#include <boost/chrono/config.hpp>
#include <boost/chrono/thread_clock.hpp>
#include <cassert>
#include <boost/assert.hpp>
#if !defined(__VXWORKS__)
# include <sys/times.h>
#endif
# include <pthread.h>
# include <unistd.h>
namespace boost { namespace chrono {
thread_clock::time_point thread_clock::now( ) BOOST_NOEXCEPT
{
struct timespec ts;
#if defined CLOCK_THREAD_CPUTIME_ID
// get the timespec associated to the thread clock
if ( ::clock_gettime( CLOCK_THREAD_CPUTIME_ID, &ts ) )
#else
// get the current thread
pthread_t pth=pthread_self();
// get the clock_id associated to the current thread
clockid_t clock_id;
pthread_getcpuclockid(pth, &clock_id);
// get the timespec associated to the thread clock
if ( ::clock_gettime( clock_id, &ts ) )
#endif
{
BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
}
// transform to nanoseconds
return time_point(duration(
static_cast<thread_clock::rep>( ts.tv_sec ) * 1000000000 + ts.tv_nsec));
}
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
thread_clock::time_point thread_clock::now( system::error_code & ec )
{
struct timespec ts;
#if defined CLOCK_THREAD_CPUTIME_ID
// get the timespec associated to the thread clock
if ( ::clock_gettime( CLOCK_THREAD_CPUTIME_ID, &ts ) )
#else
// get the current thread
pthread_t pth=pthread_self();
// get the clock_id associated to the current thread
clockid_t clock_id;
pthread_getcpuclockid(pth, &clock_id);
// get the timespec associated to the thread clock
if ( ::clock_gettime( clock_id, &ts ) )
#endif
{
if (::boost::chrono::is_throws(ec))
{
boost::throw_exception(
system::system_error(
errno,
::boost::system::system_category(),
"chrono::thread_clock" ));
}
else
{
ec.assign( errno, ::boost::system::system_category() );
return time_point();
}
}
if (!::boost::chrono::is_throws(ec))
{
ec.clear();
}
// transform to nanoseconds
return time_point(duration(
static_cast<thread_clock::rep>( ts.tv_sec ) * 1000000000 + ts.tv_nsec));
}
#endif
} }