mirror of
https://github.com/boostorg/array.git
synced 2025-06-28 21:41:00 +02:00
Compare commits
21 Commits
svn-branch
...
boost-1.44
Author | SHA1 | Date | |
---|---|---|---|
944307e343 | |||
a603bffc48 | |||
0c8902e8c2 | |||
88868ba0df | |||
99631823f6 | |||
5661b8cd63 | |||
86b069ad0e | |||
3d20bb1310 | |||
e7122b3f20 | |||
4dd2cf1b64 | |||
2e88dc228d | |||
0a4d7e81ef | |||
96d4c5f737 | |||
5a23b06a83 | |||
e85feee293 | |||
b6522b3f60 | |||
3044ab376c | |||
69188c998f | |||
4c5212f5e4 | |||
276cd991f3 | |||
1f8298fb08 |
@ -346,36 +346,36 @@ namespace boost {
|
|||||||
x.swap(y);
|
x.swap(y);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Specific for boost::array: simply returns its elems data member.
|
// Specific for boost::array: simply returns its elems data member.
|
||||||
template <typename T, std::size_t N>
|
template <typename T, std::size_t N>
|
||||||
T(&get_c_array(boost::array<T,N>& arg))[N]
|
T(&get_c_array(boost::array<T,N>& arg))[N]
|
||||||
{
|
{
|
||||||
return arg.elems;
|
return arg.elems;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Const version.
|
// Const version.
|
||||||
template <typename T, std::size_t N>
|
template <typename T, std::size_t N>
|
||||||
const T(&get_c_array(const boost::array<T,N>& arg))[N]
|
const T(&get_c_array(const boost::array<T,N>& arg))[N]
|
||||||
{
|
{
|
||||||
return arg.elems;
|
return arg.elems;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
// Overload for std::array, assuming that std::array will have
|
// Overload for std::array, assuming that std::array will have
|
||||||
// explicit conversion functions as discussed at the WG21 meeting
|
// explicit conversion functions as discussed at the WG21 meeting
|
||||||
// in Summit, March 2009.
|
// in Summit, March 2009.
|
||||||
template <typename T, std::size_t N>
|
template <typename T, std::size_t N>
|
||||||
T(&get_c_array(std::array<T,N>& arg))[N]
|
T(&get_c_array(std::array<T,N>& arg))[N]
|
||||||
{
|
{
|
||||||
return static_cast<T(&)[N]>(arg);
|
return static_cast<T(&)[N]>(arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Const version.
|
// Const version.
|
||||||
template <typename T, std::size_t N>
|
template <typename T, std::size_t N>
|
||||||
const T(&get_c_array(const std::array<T,N>& arg))[N]
|
const T(&get_c_array(const std::array<T,N>& arg))[N]
|
||||||
{
|
{
|
||||||
return static_cast<T(&)[N]>(arg);
|
return static_cast<T(&)[N]>(arg);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
} /* namespace boost */
|
} /* namespace boost */
|
||||||
|
Reference in New Issue
Block a user