forked from boostorg/array
Compare commits
3 Commits
feature/re
...
feature/in
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f017dac435 | ||
|
|
567ba40840 | ||
|
|
29700ff270 |
@@ -18,3 +18,4 @@ http://www.boost.org/LICENSE_1_0.txt
|
||||
* Removed obsolete compiler workarounds.
|
||||
* Changed `array<T, 0>::begin()`, `cbegin()`, `end()`, `cend()` to return `nullptr`, enabling `constexpr`.
|
||||
This matches the behavior of `std::array`.
|
||||
* Removed local `hash_value` overload; `boost::hash` supports array-like types natively.
|
||||
|
||||
@@ -195,6 +195,8 @@ namespace boost {
|
||||
|
||||
template< class T >
|
||||
class array< T, 0 > {
|
||||
public:
|
||||
struct {} elems; // enables initialization with = {{}}
|
||||
|
||||
public:
|
||||
// type definitions
|
||||
|
||||
@@ -44,11 +44,11 @@ template<class T> void test4()
|
||||
|
||||
int main()
|
||||
{
|
||||
// test1<int, 0>();
|
||||
test1<int, 0>();
|
||||
test1<int, 1>();
|
||||
test1<int, 7>();
|
||||
|
||||
// test1<int const, 0>();
|
||||
test1<int const, 0>();
|
||||
test1<int const, 1>();
|
||||
test1<int const, 7>();
|
||||
|
||||
|
||||
@@ -46,11 +46,11 @@ template<class T> void test4()
|
||||
|
||||
int main()
|
||||
{
|
||||
// test1<int, 0>();
|
||||
test1<int, 0>();
|
||||
test1<int, 1>();
|
||||
test1<int, 7>();
|
||||
|
||||
// test1<int const, 0>();
|
||||
test1<int const, 0>();
|
||||
test1<int const, 1>();
|
||||
test1<int const, 7>();
|
||||
|
||||
|
||||
@@ -56,7 +56,8 @@ template<class T> void test4()
|
||||
|
||||
template<class T> void test5()
|
||||
{
|
||||
// constexpr boost::array<T, 0> a = {{}};
|
||||
constexpr boost::array<T, 0> a = {{}};
|
||||
(void)a;
|
||||
}
|
||||
|
||||
template<class T> void test6()
|
||||
|
||||
@@ -94,11 +94,11 @@ template<class T> void test2()
|
||||
|
||||
int main()
|
||||
{
|
||||
// test<int, 0>();
|
||||
test<int, 0>();
|
||||
test<int, 1>();
|
||||
test<int, 7>();
|
||||
|
||||
// test<int const, 0>();
|
||||
test<int const, 0>();
|
||||
test<int const, 1>();
|
||||
test<int const, 7>();
|
||||
|
||||
|
||||
@@ -76,11 +76,11 @@ template<class T, std::size_t N> void test()
|
||||
|
||||
int main()
|
||||
{
|
||||
// test<int, 0>();
|
||||
test<int, 0>();
|
||||
test<int, 1>();
|
||||
test<int, 7>();
|
||||
|
||||
// test<int const, 0>();
|
||||
test<int const, 0>();
|
||||
test<int const, 1>();
|
||||
test<int const, 7>();
|
||||
|
||||
|
||||
@@ -49,11 +49,11 @@ template<class T, std::size_t N> void test3()
|
||||
|
||||
int main()
|
||||
{
|
||||
// test1<int, 0>();
|
||||
test1<int, 0>();
|
||||
test1<int, 1>();
|
||||
test1<int, 7>();
|
||||
|
||||
// test1<int const, 0>();
|
||||
test1<int const, 0>();
|
||||
test1<int const, 1>();
|
||||
test1<int const, 7>();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user