17 #if !defined(_MSC_VER) 18 # define PYBIND11_DESCR_CONSTEXPR static constexpr 20 # define PYBIND11_DESCR_CONSTEXPR const 24 template <
size_t N,
typename... Ts>
28 constexpr
descr() : text{
'\0'} { }
31 template <
size_t... Is>
34 template <
typename...
Chars>
35 constexpr
descr(
char c,
Chars... cs) : text{
c,
static_cast<char>(cs)...,
'\0'} { }
38 return {{&
typeid(Ts)...,
nullptr}};
42 template <
size_t N1,
size_t N2,
typename... Ts1,
typename... Ts2,
size_t... Is1,
size_t... Is2>
45 return {a.
text[Is1]..., b.
text[Is2]...};
48 template <
size_t N1,
size_t N2,
typename... Ts1,
typename... Ts2>
55 constexpr
descr<0> _(
char const(&)[1]) {
return {}; }
58 template <
size_t...Digits>
struct int_to_str<0, Digits...> {
59 static constexpr
auto digits =
descr<
sizeof...(Digits)>((
'0' + Digits)...);
63 template <
bool B,
size_t N1,
size_t N2>
67 template <
bool B,
size_t N1,
size_t N2>
72 template <
bool B,
typename T1,
typename T2>
74 template <
bool B,
typename T1,
typename T2>
78 return int_to_str<Size / 10, Size % 10>::digits;
85 template <
size_t N,
typename... Ts>
88 template <
size_t N,
typename... Ts,
typename... Args>
94 template <
size_t N,
typename... Ts>
96 return _(
"{") + descr +
_(
"}");
constexpr descr(char const (&s)[N+1], index_sequence< Is... >)
constexpr descr(char const (&s)[N+1])
constexpr descr< N1+N2, Ts1..., Ts2... > operator+(const descr< N1, Ts1... > &a, const descr< N2, Ts2... > &b)
Pose2 T2(M_PI/2.0, Point2(0.0, 2.0))
#define PYBIND11_NAMESPACE
constexpr descr< 0 > concat()
constexpr descr(char c, Chars...cs)
constexpr descr< N+2, Ts... > type_descr(const descr< N, Ts... > &descr)
constexpr descr< N1+N2, Ts1..., Ts2... > plus_impl(const descr< N1, Ts1... > &a, const descr< N2, Ts2... > &b, index_sequence< Is1... >, index_sequence< Is2... >)
constexpr descr< N-1 > _(char const (&text)[N])
static constexpr std::array< const std::type_info *, sizeof...(Ts)+1 > types()
typename std::enable_if< B, T >::type enable_if_t
from cpp_future import (convenient aliases from C++14/17)
Pose2 T1(M_PI/4.0, Point2(sqrt(0.5), sqrt(0.5)))
typename make_index_sequence_impl< N >::type make_index_sequence
#define PYBIND11_NAMESPACE_END(name)
std::vector< char > Chars
#define PYBIND11_NAMESPACE_BEGIN(name)