mirror of
https://github.com/boostorg/array.git
synced 2025-06-26 12:31:41 +02:00
Compare commits
22 Commits
feature/wa
...
develop
Author | SHA1 | Date | |
---|---|---|---|
e988ef9c4a | |||
a0be8d9537 | |||
eee0d5bbc5 | |||
ec61272c1f | |||
e97dc53868 | |||
ffbced7a17 | |||
37289c5d92 | |||
9b508e3ad2 | |||
84d0f84c9b | |||
37a4833e26 | |||
8991751e3b | |||
b2f6f0ca65 | |||
703ad46b81 | |||
7482efd0a1 | |||
78fb6a71dd | |||
40e2a2d4d8 | |||
fc10453994 | |||
28d8d30b57 | |||
fe1e99eb31 | |||
1469f4b28e | |||
d535c37a57 | |||
36bba5af2d |
@ -235,6 +235,76 @@ local windows_pipeline(name, image, environment, arch = "amd64") =
|
|||||||
"clang-3.8",
|
"clang-3.8",
|
||||||
),
|
),
|
||||||
|
|
||||||
|
linux_pipeline(
|
||||||
|
"Linux 18.04 Clang 3.9",
|
||||||
|
"cppalliance/droneubuntu1804:1",
|
||||||
|
{ TOOLSET: 'clang', COMPILER: 'clang++-3.9', CXXSTD: '03,11,14' },
|
||||||
|
"clang-3.9",
|
||||||
|
),
|
||||||
|
|
||||||
|
linux_pipeline(
|
||||||
|
"Linux 18.04 Clang 4.0",
|
||||||
|
"cppalliance/droneubuntu1804:1",
|
||||||
|
{ TOOLSET: 'clang', COMPILER: 'clang++-4.0', CXXSTD: '03,11,14' },
|
||||||
|
"clang-4.0",
|
||||||
|
),
|
||||||
|
|
||||||
|
linux_pipeline(
|
||||||
|
"Linux 18.04 Clang 5.0",
|
||||||
|
"cppalliance/droneubuntu1804:1",
|
||||||
|
{ TOOLSET: 'clang', COMPILER: 'clang++-5.0', CXXSTD: '03,11,14,1z' },
|
||||||
|
"clang-5.0",
|
||||||
|
),
|
||||||
|
|
||||||
|
linux_pipeline(
|
||||||
|
"Linux 18.04 Clang 6.0",
|
||||||
|
"cppalliance/droneubuntu1804:1",
|
||||||
|
{ TOOLSET: 'clang', COMPILER: 'clang++-6.0', CXXSTD: '03,11,14,17' },
|
||||||
|
"clang-6.0",
|
||||||
|
),
|
||||||
|
|
||||||
|
linux_pipeline(
|
||||||
|
"Linux 20.04 Clang 7",
|
||||||
|
"cppalliance/droneubuntu2004:1",
|
||||||
|
{ TOOLSET: 'clang', COMPILER: 'clang++-7', CXXSTD: '03,11,14,17' },
|
||||||
|
"clang-7",
|
||||||
|
),
|
||||||
|
|
||||||
|
linux_pipeline(
|
||||||
|
"Linux 20.04 Clang 8",
|
||||||
|
"cppalliance/droneubuntu2004:1",
|
||||||
|
{ TOOLSET: 'clang', COMPILER: 'clang++-8', CXXSTD: '03,11,14,17' },
|
||||||
|
"clang-8",
|
||||||
|
),
|
||||||
|
|
||||||
|
linux_pipeline(
|
||||||
|
"Linux 20.04 Clang 9",
|
||||||
|
"cppalliance/droneubuntu2004:1",
|
||||||
|
{ TOOLSET: 'clang', COMPILER: 'clang++-9', CXXSTD: '03,11,14,17,2a' },
|
||||||
|
"clang-9",
|
||||||
|
),
|
||||||
|
|
||||||
|
linux_pipeline(
|
||||||
|
"Linux 20.04 Clang 10",
|
||||||
|
"cppalliance/droneubuntu2004:1",
|
||||||
|
{ TOOLSET: 'clang', COMPILER: 'clang++-10', CXXSTD: '03,11,14,17,2a' },
|
||||||
|
"clang-10",
|
||||||
|
),
|
||||||
|
|
||||||
|
linux_pipeline(
|
||||||
|
"Linux 20.04 Clang 11",
|
||||||
|
"cppalliance/droneubuntu2004:1",
|
||||||
|
{ TOOLSET: 'clang', COMPILER: 'clang++-11', CXXSTD: '03,11,14,17,2a' },
|
||||||
|
"clang-11",
|
||||||
|
),
|
||||||
|
|
||||||
|
linux_pipeline(
|
||||||
|
"Linux 20.04 Clang 12",
|
||||||
|
"cppalliance/droneubuntu2004:1",
|
||||||
|
{ TOOLSET: 'clang', COMPILER: 'clang++-12', CXXSTD: '03,11,14,17,2a' },
|
||||||
|
"clang-12",
|
||||||
|
),
|
||||||
|
|
||||||
linux_pipeline(
|
linux_pipeline(
|
||||||
"Linux 22.04 Clang 13",
|
"Linux 22.04 Clang 13",
|
||||||
"cppalliance/droneubuntu2204:1",
|
"cppalliance/droneubuntu2204:1",
|
||||||
|
@ -16,7 +16,6 @@ target_link_libraries(boost_array
|
|||||||
INTERFACE
|
INTERFACE
|
||||||
Boost::assert
|
Boost::assert
|
||||||
Boost::config
|
Boost::config
|
||||||
Boost::core
|
|
||||||
Boost::static_assert
|
Boost::static_assert
|
||||||
Boost::throw_exception
|
Boost::throw_exception
|
||||||
)
|
)
|
||||||
|
24
build.jam
Normal file
24
build.jam
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
# Copyright 2023-2024 René Ferdinand Rivera Morell
|
||||||
|
# Copyright 2024 Peter Dimov
|
||||||
|
# Distributed under the Boost Software License, Version 1.0.
|
||||||
|
# https://www.boost.org/LICENSE_1_0.txt
|
||||||
|
|
||||||
|
require-b2 5.2 ;
|
||||||
|
|
||||||
|
constant boost_dependencies :
|
||||||
|
/boost/assert//boost_assert
|
||||||
|
/boost/config//boost_config
|
||||||
|
/boost/static_assert//boost_static_assert
|
||||||
|
/boost/throw_exception//boost_throw_exception
|
||||||
|
;
|
||||||
|
|
||||||
|
project /boost/array ;
|
||||||
|
|
||||||
|
explicit
|
||||||
|
[ alias boost_array : : : : <include>include <library>$(boost_dependencies) ]
|
||||||
|
[ alias all : boost_array test ]
|
||||||
|
;
|
||||||
|
|
||||||
|
call-if : boost-library array
|
||||||
|
;
|
||||||
|
|
@ -21,3 +21,4 @@ http://www.boost.org/LICENSE_1_0.txt
|
|||||||
* Removed local `hash_value` overload; `boost::hash` supports array-like types natively.
|
* Removed local `hash_value` overload; `boost::hash` supports array-like types natively.
|
||||||
* `array<T, 0>` can now be initialized with `= {{}}`.
|
* `array<T, 0>` can now be initialized with `= {{}}`.
|
||||||
* Added `operator\<\=>`.
|
* Added `operator\<\=>`.
|
||||||
|
* Added `to_array`.
|
||||||
|
@ -42,6 +42,13 @@ namespace boost {
|
|||||||
constexpr T& get(array<T, N>&) noexcept;
|
constexpr T& get(array<T, N>&) noexcept;
|
||||||
template<std::size_t Idx, typename T, std::size_t N>
|
template<std::size_t Idx, typename T, std::size_t N>
|
||||||
constexpr const T& get(const array<T, N>&) noexcept;
|
constexpr const T& get(const array<T, N>&) noexcept;
|
||||||
|
|
||||||
|
template<class T, std::size_t N>
|
||||||
|
constexpr array<T, N> to_array( T const (&)[N] );
|
||||||
|
template<class T, std::size_t N>
|
||||||
|
constexpr array<T, N> to_array( T (&&)[N] );
|
||||||
|
template<class T, std::size_t N>
|
||||||
|
constexpr array<T, N> to_array( T const (&&)[N] );
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -417,3 +424,29 @@ Mandates: :: `Idx < N`.
|
|||||||
Returns: :: `arr[Idx]`.
|
Returns: :: `arr[Idx]`.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
||||||
|
### Creation
|
||||||
|
|
||||||
|
```
|
||||||
|
template<class T, std::size_t N>
|
||||||
|
constexpr array<T, N> to_array( T const (&a)[N] );
|
||||||
|
```
|
||||||
|
[horizontal]
|
||||||
|
Returns: :: an `array<T, N>` `r` such that for each `i` in `[0..N)`, `r[i]` is copied from `a[i]`.
|
||||||
|
|
||||||
|
```
|
||||||
|
template<class T, std::size_t N>
|
||||||
|
constexpr array<T, N> to_array( T (&&a)[N] );
|
||||||
|
```
|
||||||
|
[horizontal]
|
||||||
|
Returns: :: an `array<T, N>` `r` such that for each `i` in `[0..N)`, `r[i]` is moved from `std::move(a[i])`.
|
||||||
|
|
||||||
|
```
|
||||||
|
template<class T, std::size_t N>
|
||||||
|
constexpr array<T, N> to_array( T const (&&a)[N] );
|
||||||
|
```
|
||||||
|
[horizontal]
|
||||||
|
Returns: :: an `array<T, N>` `r` such that for each `i` in `[0..N)`, `r[i]` is copied from `a[i]`.
|
||||||
|
|
||||||
|
---
|
||||||
|
@ -51,6 +51,12 @@
|
|||||||
#include <utility>
|
#include <utility>
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
|
|
||||||
|
#if defined(__cpp_impl_three_way_comparison) && __cpp_impl_three_way_comparison >= 201907L
|
||||||
|
# if __has_include(<compare>)
|
||||||
|
# include <compare>
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace boost {
|
namespace boost {
|
||||||
|
|
||||||
template<class T, std::size_t N>
|
template<class T, std::size_t N>
|
||||||
@ -383,6 +389,7 @@ namespace boost {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if defined(__cpp_impl_three_way_comparison) && __cpp_impl_three_way_comparison >= 201907L
|
#if defined(__cpp_impl_three_way_comparison) && __cpp_impl_three_way_comparison >= 201907L
|
||||||
|
# if __has_include(<compare>)
|
||||||
|
|
||||||
template<class T, std::size_t N>
|
template<class T, std::size_t N>
|
||||||
constexpr auto operator<=> (const array<T,N>& x, const array<T,N>& y)
|
constexpr auto operator<=> (const array<T,N>& x, const array<T,N>& y)
|
||||||
@ -394,16 +401,17 @@ namespace boost {
|
|||||||
if( r != 0 ) return r;
|
if( r != 0 ) return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0 <=> 0; // std::strong_ordering::equal
|
return std::strong_ordering::equal;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
constexpr auto operator<=> (const array<T,0>& /*x*/, const array<T,0>& /*y*/)
|
constexpr auto operator<=> (const array<T,0>& /*x*/, const array<T,0>& /*y*/)
|
||||||
-> decltype( 0 <=> 0 )
|
-> std::strong_ordering
|
||||||
{
|
{
|
||||||
return 0 <=> 0; // std::strong_ordering::equal
|
return std::strong_ordering::equal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// undocumented and obsolete
|
// undocumented and obsolete
|
||||||
@ -422,17 +430,62 @@ namespace boost {
|
|||||||
return arg.elems;
|
return arg.elems;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <size_t Idx, typename T, size_t N>
|
template <size_t Idx, typename T, size_t N>
|
||||||
BOOST_CXX14_CONSTEXPR T &get(boost::array<T,N> &arr) BOOST_NOEXCEPT {
|
BOOST_CXX14_CONSTEXPR T &get(boost::array<T,N> &arr) BOOST_NOEXCEPT
|
||||||
BOOST_STATIC_ASSERT_MSG ( Idx < N, "boost::get<>(boost::array &) index out of range" );
|
{
|
||||||
return arr[Idx];
|
BOOST_STATIC_ASSERT_MSG ( Idx < N, "boost::get<>(boost::array &) index out of range" );
|
||||||
}
|
return arr[Idx];
|
||||||
|
}
|
||||||
|
|
||||||
template <size_t Idx, typename T, size_t N>
|
template <size_t Idx, typename T, size_t N>
|
||||||
BOOST_CONSTEXPR const T &get(const boost::array<T,N> &arr) BOOST_NOEXCEPT {
|
BOOST_CONSTEXPR const T &get(const boost::array<T,N> &arr) BOOST_NOEXCEPT
|
||||||
BOOST_STATIC_ASSERT_MSG ( Idx < N, "boost::get<>(const boost::array &) index out of range" );
|
{
|
||||||
return arr[Idx];
|
BOOST_STATIC_ASSERT_MSG ( Idx < N, "boost::get<>(const boost::array &) index out of range" );
|
||||||
}
|
return arr[Idx];
|
||||||
|
}
|
||||||
|
|
||||||
|
template<class T, std::size_t N>
|
||||||
|
BOOST_CXX14_CONSTEXPR array<T, N> to_array( T const (&a)[ N ] )
|
||||||
|
{
|
||||||
|
array<T, N> r = {};
|
||||||
|
|
||||||
|
for( std::size_t i = 0; i < N; ++i )
|
||||||
|
{
|
||||||
|
r[ i ] = a[ i ];
|
||||||
|
}
|
||||||
|
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
|
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||||
|
|
||||||
|
template<class T, std::size_t N>
|
||||||
|
BOOST_CXX14_CONSTEXPR array<T, N> to_array( T (&&a)[ N ] )
|
||||||
|
{
|
||||||
|
array<T, N> r = {};
|
||||||
|
|
||||||
|
for( std::size_t i = 0; i < N; ++i )
|
||||||
|
{
|
||||||
|
r[ i ] = std::move( a[ i ] );
|
||||||
|
}
|
||||||
|
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
|
template<class T, std::size_t N>
|
||||||
|
BOOST_CXX14_CONSTEXPR array<T, N> to_array( T const (&&a)[ N ] )
|
||||||
|
{
|
||||||
|
array<T, N> r = {};
|
||||||
|
|
||||||
|
for( std::size_t i = 0; i < N; ++i )
|
||||||
|
{
|
||||||
|
r[ i ] = a[ i ];
|
||||||
|
}
|
||||||
|
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
} /* namespace boost */
|
} /* namespace boost */
|
||||||
|
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
Automatic redirection failed, please go to
|
Automatic redirection failed, please go to
|
||||||
<a href="../../doc/html/array.html">doc/html/array.html</a> <hr>
|
<a href="doc/html/array.html">doc/html/array.html</a> <hr>
|
||||||
<p><EFBFBD> Copyright Beman Dawes, 2001</p>
|
<p>© Copyright Beman Dawes, 2001</p>
|
||||||
<p>Distributed under the Boost Software License, Version 1.0. (See accompanying
|
<p>Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||||
file <a href="../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or copy
|
file <a href="../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or copy
|
||||||
at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</p>
|
at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</p>
|
||||||
|
@ -10,6 +10,9 @@ import config : requires ;
|
|||||||
project
|
project
|
||||||
: requirements
|
: requirements
|
||||||
|
|
||||||
|
<library>/boost/array//boost_array
|
||||||
|
<library>/boost/core//boost_core
|
||||||
|
|
||||||
<warnings>extra
|
<warnings>extra
|
||||||
|
|
||||||
<toolset>msvc:<warnings-as-errors>on
|
<toolset>msvc:<warnings-as-errors>on
|
||||||
@ -58,7 +61,7 @@ compile-fail array_getfail2.cpp
|
|||||||
: <warnings>off ;
|
: <warnings>off ;
|
||||||
|
|
||||||
run array_hash.cpp
|
run array_hash.cpp
|
||||||
: : : [ requires cxx11_noexcept ] ;
|
: : : <library>/boost/container_hash//boost_container_hash [ requires cxx11_noexcept ] ;
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
||||||
@ -81,6 +84,7 @@ run array_eq_test.cpp ;
|
|||||||
run array_lt_test.cpp ;
|
run array_lt_test.cpp ;
|
||||||
run array_thw_test.cpp ;
|
run array_thw_test.cpp ;
|
||||||
run array_get_test.cpp ;
|
run array_get_test.cpp ;
|
||||||
|
run to_array_test.cpp ;
|
||||||
|
|
||||||
# C++11 constexpr
|
# C++11 constexpr
|
||||||
|
|
||||||
@ -100,6 +104,7 @@ compile array_fill_test_cx.cpp ;
|
|||||||
compile array_eq_test_cx.cpp ;
|
compile array_eq_test_cx.cpp ;
|
||||||
compile array_lt_test_cx.cpp ;
|
compile array_lt_test_cx.cpp ;
|
||||||
compile array_thw_test_cx.cpp ;
|
compile array_thw_test_cx.cpp ;
|
||||||
|
compile to_array_test_cx.cpp ;
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// Copyright 2025 Peter Dimov
|
// Copyright 2025 Peter Dimov
|
||||||
// Distributed under the Boost Software License, Version 1.0.
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
// https://www.boost.org/LICENSE_1_0.txt)
|
// https://www.boost.org/LICENSE_1_0.txt
|
||||||
|
|
||||||
#define BOOST_ENABLE_ASSERT_HANDLER
|
#define BOOST_ENABLE_ASSERT_HANDLER
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// Copyright 2025 Peter Dimov
|
// Copyright 2025 Peter Dimov
|
||||||
// Distributed under the Boost Software License, Version 1.0.
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
// https://www.boost.org/LICENSE_1_0.txt)
|
// https://www.boost.org/LICENSE_1_0.txt
|
||||||
|
|
||||||
#include <boost/array.hpp>
|
#include <boost/array.hpp>
|
||||||
#include <boost/config.hpp>
|
#include <boost/config.hpp>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// Copyright 2025 Peter Dimov
|
// Copyright 2025 Peter Dimov
|
||||||
// Distributed under the Boost Software License, Version 1.0.
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
// https://www.boost.org/LICENSE_1_0.txt)
|
// https://www.boost.org/LICENSE_1_0.txt
|
||||||
|
|
||||||
#include <boost/array.hpp>
|
#include <boost/array.hpp>
|
||||||
#include <boost/config.hpp>
|
#include <boost/config.hpp>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// Copyright 2025 Peter Dimov
|
// Copyright 2025 Peter Dimov
|
||||||
// Distributed under the Boost Software License, Version 1.0.
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
// https://www.boost.org/LICENSE_1_0.txt)
|
// https://www.boost.org/LICENSE_1_0.txt
|
||||||
|
|
||||||
#define BOOST_ALLOW_DEPRECATED_SYMBOLS
|
#define BOOST_ALLOW_DEPRECATED_SYMBOLS
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// Copyright 2025 Peter Dimov
|
// Copyright 2025 Peter Dimov
|
||||||
// Distributed under the Boost Software License, Version 1.0.
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
// https://www.boost.org/LICENSE_1_0.txt)
|
// https://www.boost.org/LICENSE_1_0.txt
|
||||||
|
|
||||||
#include <boost/array.hpp>
|
#include <boost/array.hpp>
|
||||||
#include <boost/config.hpp>
|
#include <boost/config.hpp>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// Copyright 2025 Peter Dimov
|
// Copyright 2025 Peter Dimov
|
||||||
// Distributed under the Boost Software License, Version 1.0.
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
// https://www.boost.org/LICENSE_1_0.txt)
|
// https://www.boost.org/LICENSE_1_0.txt
|
||||||
|
|
||||||
#define BOOST_ALLOW_DEPRECATED_SYMBOLS
|
#define BOOST_ALLOW_DEPRECATED_SYMBOLS
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// Copyright 2025 Peter Dimov
|
// Copyright 2025 Peter Dimov
|
||||||
// Distributed under the Boost Software License, Version 1.0.
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
// https://www.boost.org/LICENSE_1_0.txt)
|
// https://www.boost.org/LICENSE_1_0.txt
|
||||||
|
|
||||||
#include <boost/array.hpp>
|
#include <boost/array.hpp>
|
||||||
#include <boost/core/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// Copyright 2025 Peter Dimov
|
// Copyright 2025 Peter Dimov
|
||||||
// Distributed under the Boost Software License, Version 1.0.
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
// https://www.boost.org/LICENSE_1_0.txt)
|
// https://www.boost.org/LICENSE_1_0.txt
|
||||||
|
|
||||||
#include <boost/array.hpp>
|
#include <boost/array.hpp>
|
||||||
#include <boost/core/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// Copyright 2025 Peter Dimov
|
// Copyright 2025 Peter Dimov
|
||||||
// Distributed under the Boost Software License, Version 1.0.
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
// https://www.boost.org/LICENSE_1_0.txt)
|
// https://www.boost.org/LICENSE_1_0.txt
|
||||||
|
|
||||||
#include <boost/array.hpp>
|
#include <boost/array.hpp>
|
||||||
#include <boost/config.hpp>
|
#include <boost/config.hpp>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// Copyright 2025 Peter Dimov
|
// Copyright 2025 Peter Dimov
|
||||||
// Distributed under the Boost Software License, Version 1.0.
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
// https://www.boost.org/LICENSE_1_0.txt)
|
// https://www.boost.org/LICENSE_1_0.txt
|
||||||
|
|
||||||
#include <boost/array.hpp>
|
#include <boost/array.hpp>
|
||||||
#include <boost/core/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// Copyright 2025 Peter Dimov
|
// Copyright 2025 Peter Dimov
|
||||||
// Distributed under the Boost Software License, Version 1.0.
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
// https://www.boost.org/LICENSE_1_0.txt)
|
// https://www.boost.org/LICENSE_1_0.txt
|
||||||
|
|
||||||
#include <boost/array.hpp>
|
#include <boost/array.hpp>
|
||||||
#include <boost/config.hpp>
|
#include <boost/config.hpp>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// Copyright 2025 Peter Dimov
|
// Copyright 2025 Peter Dimov
|
||||||
// Distributed under the Boost Software License, Version 1.0.
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
// https://www.boost.org/LICENSE_1_0.txt)
|
// https://www.boost.org/LICENSE_1_0.txt
|
||||||
|
|
||||||
#include <boost/array.hpp>
|
#include <boost/array.hpp>
|
||||||
#include <boost/core/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// Copyright 2025 Peter Dimov
|
// Copyright 2025 Peter Dimov
|
||||||
// Distributed under the Boost Software License, Version 1.0.
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
// https://www.boost.org/LICENSE_1_0.txt)
|
// https://www.boost.org/LICENSE_1_0.txt
|
||||||
|
|
||||||
#include <boost/array.hpp>
|
#include <boost/array.hpp>
|
||||||
#include <boost/core/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// Copyright 2025 Peter Dimov
|
// Copyright 2025 Peter Dimov
|
||||||
// Distributed under the Boost Software License, Version 1.0.
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
// https://www.boost.org/LICENSE_1_0.txt)
|
// https://www.boost.org/LICENSE_1_0.txt
|
||||||
|
|
||||||
#include <boost/array.hpp>
|
#include <boost/array.hpp>
|
||||||
#include <boost/config.hpp>
|
#include <boost/config.hpp>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// Copyright 2025 Peter Dimov
|
// Copyright 2025 Peter Dimov
|
||||||
// Distributed under the Boost Software License, Version 1.0.
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
// https://www.boost.org/LICENSE_1_0.txt)
|
// https://www.boost.org/LICENSE_1_0.txt
|
||||||
|
|
||||||
#include <boost/array.hpp>
|
#include <boost/array.hpp>
|
||||||
#include <boost/core/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// Copyright 2025 Peter Dimov
|
// Copyright 2025 Peter Dimov
|
||||||
// Distributed under the Boost Software License, Version 1.0.
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
// https://www.boost.org/LICENSE_1_0.txt)
|
// https://www.boost.org/LICENSE_1_0.txt
|
||||||
|
|
||||||
#include <boost/array.hpp>
|
#include <boost/array.hpp>
|
||||||
#include <boost/config.hpp>
|
#include <boost/config.hpp>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// Copyright 2025 Peter Dimov
|
// Copyright 2025 Peter Dimov
|
||||||
// Distributed under the Boost Software License, Version 1.0.
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
// https://www.boost.org/LICENSE_1_0.txt)
|
// https://www.boost.org/LICENSE_1_0.txt
|
||||||
|
|
||||||
#include <boost/array.hpp>
|
#include <boost/array.hpp>
|
||||||
#include <boost/core/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// Copyright 2025 Peter Dimov
|
// Copyright 2025 Peter Dimov
|
||||||
// Distributed under the Boost Software License, Version 1.0.
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
// https://www.boost.org/LICENSE_1_0.txt)
|
// https://www.boost.org/LICENSE_1_0.txt
|
||||||
|
|
||||||
#include <boost/array.hpp>
|
#include <boost/array.hpp>
|
||||||
#include <boost/config.hpp>
|
#include <boost/config.hpp>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// Copyright 2025 Peter Dimov
|
// Copyright 2025 Peter Dimov
|
||||||
// Distributed under the Boost Software License, Version 1.0.
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
// https://www.boost.org/LICENSE_1_0.txt)
|
// https://www.boost.org/LICENSE_1_0.txt
|
||||||
|
|
||||||
#include <boost/array.hpp>
|
#include <boost/array.hpp>
|
||||||
#include <boost/core/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// Copyright 2025 Peter Dimov
|
// Copyright 2025 Peter Dimov
|
||||||
// Distributed under the Boost Software License, Version 1.0.
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
// https://www.boost.org/LICENSE_1_0.txt)
|
// https://www.boost.org/LICENSE_1_0.txt
|
||||||
|
|
||||||
#include <boost/array.hpp>
|
#include <boost/array.hpp>
|
||||||
#include <boost/config.hpp>
|
#include <boost/config.hpp>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// Copyright 2025 Peter Dimov
|
// Copyright 2025 Peter Dimov
|
||||||
// Distributed under the Boost Software License, Version 1.0.
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
// https://www.boost.org/LICENSE_1_0.txt)
|
// https://www.boost.org/LICENSE_1_0.txt
|
||||||
|
|
||||||
#include <boost/array.hpp>
|
#include <boost/array.hpp>
|
||||||
#include <boost/core/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// Copyright 2025 Peter Dimov
|
// Copyright 2025 Peter Dimov
|
||||||
// Distributed under the Boost Software License, Version 1.0.
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
// https://www.boost.org/LICENSE_1_0.txt)
|
// https://www.boost.org/LICENSE_1_0.txt
|
||||||
|
|
||||||
#include <boost/array.hpp>
|
#include <boost/array.hpp>
|
||||||
#include <boost/config.hpp>
|
#include <boost/config.hpp>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// Copyright 2025 Peter Dimov
|
// Copyright 2025 Peter Dimov
|
||||||
// Distributed under the Boost Software License, Version 1.0.
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
// https://www.boost.org/LICENSE_1_0.txt)
|
// https://www.boost.org/LICENSE_1_0.txt
|
||||||
|
|
||||||
#include <boost/array.hpp>
|
#include <boost/array.hpp>
|
||||||
#include <boost/core/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// Copyright 2025 Peter Dimov
|
// Copyright 2025 Peter Dimov
|
||||||
// Distributed under the Boost Software License, Version 1.0.
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
// https://www.boost.org/LICENSE_1_0.txt)
|
// https://www.boost.org/LICENSE_1_0.txt
|
||||||
|
|
||||||
#include <boost/array.hpp>
|
#include <boost/array.hpp>
|
||||||
#include <boost/config.hpp>
|
#include <boost/config.hpp>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// Copyright 2025 Peter Dimov
|
// Copyright 2025 Peter Dimov
|
||||||
// Distributed under the Boost Software License, Version 1.0.
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
// https://www.boost.org/LICENSE_1_0.txt)
|
// https://www.boost.org/LICENSE_1_0.txt
|
||||||
|
|
||||||
#include <boost/array.hpp>
|
#include <boost/array.hpp>
|
||||||
#include <boost/core/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// Copyright 2025 Peter Dimov
|
// Copyright 2025 Peter Dimov
|
||||||
// Distributed under the Boost Software License, Version 1.0.
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
// https://www.boost.org/LICENSE_1_0.txt)
|
// https://www.boost.org/LICENSE_1_0.txt
|
||||||
|
|
||||||
#include <boost/array.hpp>
|
#include <boost/array.hpp>
|
||||||
#include <boost/core/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// Copyright 2025 Peter Dimov
|
// Copyright 2025 Peter Dimov
|
||||||
// Distributed under the Boost Software License, Version 1.0.
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
// https://www.boost.org/LICENSE_1_0.txt)
|
// https://www.boost.org/LICENSE_1_0.txt
|
||||||
|
|
||||||
#include <boost/array.hpp>
|
#include <boost/array.hpp>
|
||||||
#include <boost/config.hpp>
|
#include <boost/config.hpp>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// Copyright 2025 Peter Dimov
|
// Copyright 2025 Peter Dimov
|
||||||
// Distributed under the Boost Software License, Version 1.0.
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
// https://www.boost.org/LICENSE_1_0.txt)
|
// https://www.boost.org/LICENSE_1_0.txt
|
||||||
|
|
||||||
#include <boost/array.hpp>
|
#include <boost/array.hpp>
|
||||||
#include <boost/core/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// Copyright 2025 Peter Dimov
|
// Copyright 2025 Peter Dimov
|
||||||
// Distributed under the Boost Software License, Version 1.0.
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
// https://www.boost.org/LICENSE_1_0.txt)
|
// https://www.boost.org/LICENSE_1_0.txt
|
||||||
|
|
||||||
#include <boost/array.hpp>
|
#include <boost/array.hpp>
|
||||||
#include <boost/core/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// Copyright 2025 Peter Dimov
|
// Copyright 2025 Peter Dimov
|
||||||
// Distributed under the Boost Software License, Version 1.0.
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
// https://www.boost.org/LICENSE_1_0.txt)
|
// https://www.boost.org/LICENSE_1_0.txt
|
||||||
|
|
||||||
#include <boost/array.hpp>
|
#include <boost/array.hpp>
|
||||||
#include <boost/core/lightweight_test.hpp>
|
#include <boost/core/lightweight_test.hpp>
|
||||||
@ -8,6 +8,12 @@
|
|||||||
#include <boost/config/pragma_message.hpp>
|
#include <boost/config/pragma_message.hpp>
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
|
|
||||||
|
#if defined(__has_include)
|
||||||
|
# if __has_include(<compare>)
|
||||||
|
# define HAS_COMPARE
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#if !defined(__cpp_impl_three_way_comparison)
|
#if !defined(__cpp_impl_three_way_comparison)
|
||||||
|
|
||||||
BOOST_PRAGMA_MESSAGE( "Test skipped because __cpp_impl_three_way_comparison is not defined" )
|
BOOST_PRAGMA_MESSAGE( "Test skipped because __cpp_impl_three_way_comparison is not defined" )
|
||||||
@ -18,6 +24,11 @@ int main() {}
|
|||||||
BOOST_PRAGMA_MESSAGE( "Test skipped because __cpp_impl_three_way_comparison is defined to " BOOST_STRINGIZE(__cpp_impl_three_way_comparison) )
|
BOOST_PRAGMA_MESSAGE( "Test skipped because __cpp_impl_three_way_comparison is defined to " BOOST_STRINGIZE(__cpp_impl_three_way_comparison) )
|
||||||
int main() {}
|
int main() {}
|
||||||
|
|
||||||
|
#elif !defined(HAS_COMPARE)
|
||||||
|
|
||||||
|
BOOST_PRAGMA_MESSAGE( "Test skipped because <compare> is not available" )
|
||||||
|
int main() {}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
template<class T, std::size_t N> void test()
|
template<class T, std::size_t N> void test()
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// Copyright 2025 Peter Dimov
|
// Copyright 2025 Peter Dimov
|
||||||
// Distributed under the Boost Software License, Version 1.0.
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
// https://www.boost.org/LICENSE_1_0.txt)
|
// https://www.boost.org/LICENSE_1_0.txt
|
||||||
|
|
||||||
#include <boost/array.hpp>
|
#include <boost/array.hpp>
|
||||||
#include <boost/config.hpp>
|
#include <boost/config.hpp>
|
||||||
@ -8,6 +8,12 @@
|
|||||||
#include <boost/config/workaround.hpp>
|
#include <boost/config/workaround.hpp>
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
|
|
||||||
|
#if defined(__has_include)
|
||||||
|
# if __has_include(<compare>)
|
||||||
|
# define HAS_COMPARE
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#if !defined(__cpp_impl_three_way_comparison)
|
#if !defined(__cpp_impl_three_way_comparison)
|
||||||
|
|
||||||
BOOST_PRAGMA_MESSAGE( "Test skipped because __cpp_impl_three_way_comparison is not defined" )
|
BOOST_PRAGMA_MESSAGE( "Test skipped because __cpp_impl_three_way_comparison is not defined" )
|
||||||
@ -18,6 +24,11 @@ int main() {}
|
|||||||
BOOST_PRAGMA_MESSAGE( "Test skipped because __cpp_impl_three_way_comparison is defined to " BOOST_STRINGIZE(__cpp_impl_three_way_comparison) )
|
BOOST_PRAGMA_MESSAGE( "Test skipped because __cpp_impl_three_way_comparison is defined to " BOOST_STRINGIZE(__cpp_impl_three_way_comparison) )
|
||||||
int main() {}
|
int main() {}
|
||||||
|
|
||||||
|
#elif !defined(HAS_COMPARE)
|
||||||
|
|
||||||
|
BOOST_PRAGMA_MESSAGE( "Test skipped because <compare> is not available" )
|
||||||
|
int main() {}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#define STATIC_ASSERT(...) static_assert(__VA_ARGS__, #__VA_ARGS__)
|
#define STATIC_ASSERT(...) static_assert(__VA_ARGS__, #__VA_ARGS__)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// Copyright 2025 Peter Dimov
|
// Copyright 2025 Peter Dimov
|
||||||
// Distributed under the Boost Software License, Version 1.0.
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
// https://www.boost.org/LICENSE_1_0.txt)
|
// https://www.boost.org/LICENSE_1_0.txt
|
||||||
|
|
||||||
#include <boost/array.hpp>
|
#include <boost/array.hpp>
|
||||||
#include <boost/core/lightweight_test_trait.hpp>
|
#include <boost/core/lightweight_test_trait.hpp>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// Copyright 2023 Peter Dimov.
|
// Copyright 2023 Peter Dimov.
|
||||||
// Distributed under the Boost Software License, Version 1.0.
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
// https://www.boost.org/LICENSE_1_0.txt)
|
// https://www.boost.org/LICENSE_1_0.txt
|
||||||
|
|
||||||
#include <boost/array.hpp>
|
#include <boost/array.hpp>
|
||||||
|
|
||||||
|
109
test/to_array_test.cpp
Normal file
109
test/to_array_test.cpp
Normal file
@ -0,0 +1,109 @@
|
|||||||
|
// Copyright 2025 Peter Dimov
|
||||||
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
|
// https://www.boost.org/LICENSE_1_0.txt
|
||||||
|
|
||||||
|
#include <boost/array.hpp>
|
||||||
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
#include <boost/config.hpp>
|
||||||
|
#include <boost/config/workaround.hpp>
|
||||||
|
#include <memory>
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
|
boost::array<int, 3> f1()
|
||||||
|
{
|
||||||
|
boost::array<int, 3> r = {{ 1, 2, 3 }};
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
|
boost::array<int, 3> const f2()
|
||||||
|
{
|
||||||
|
boost::array<int, 3> r = {{ 1, 2, 3 }};
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
{
|
||||||
|
int a[] = { 1, 2, 3 };
|
||||||
|
|
||||||
|
boost::array<int, 3> b = boost::to_array( a );
|
||||||
|
|
||||||
|
BOOST_TEST_EQ( b[0], 1 );
|
||||||
|
BOOST_TEST_EQ( b[1], 2 );
|
||||||
|
BOOST_TEST_EQ( b[2], 3 );
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
int const a[] = { 1, 2, 3 };
|
||||||
|
|
||||||
|
boost::array<int, 3> b = boost::to_array( a );
|
||||||
|
|
||||||
|
BOOST_TEST_EQ( b[0], 1 );
|
||||||
|
BOOST_TEST_EQ( b[1], 2 );
|
||||||
|
BOOST_TEST_EQ( b[2], 3 );
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
boost::array<int, 3> b = boost::to_array( f1().elems );
|
||||||
|
|
||||||
|
BOOST_TEST_EQ( b[0], 1 );
|
||||||
|
BOOST_TEST_EQ( b[1], 2 );
|
||||||
|
BOOST_TEST_EQ( b[2], 3 );
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
boost::array<int, 3> b = boost::to_array( f2().elems );
|
||||||
|
|
||||||
|
BOOST_TEST_EQ( b[0], 1 );
|
||||||
|
BOOST_TEST_EQ( b[1], 2 );
|
||||||
|
BOOST_TEST_EQ( b[2], 3 );
|
||||||
|
}
|
||||||
|
|
||||||
|
#if BOOST_CXX_VERSION >= 201103L
|
||||||
|
|
||||||
|
#if !BOOST_WORKAROUND(BOOST_MSVC, < 1910)
|
||||||
|
{
|
||||||
|
int a[] = { 1, 2, 3 };
|
||||||
|
|
||||||
|
boost::array<int, 3> b = boost::to_array( std::move( a ) );
|
||||||
|
|
||||||
|
BOOST_TEST_EQ( b[0], 1 );
|
||||||
|
BOOST_TEST_EQ( b[1], 2 );
|
||||||
|
BOOST_TEST_EQ( b[2], 3 );
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
int const a[] = { 1, 2, 3 };
|
||||||
|
|
||||||
|
boost::array<int, 3> b = boost::to_array( std::move( a ) );
|
||||||
|
|
||||||
|
BOOST_TEST_EQ( b[0], 1 );
|
||||||
|
BOOST_TEST_EQ( b[1], 2 );
|
||||||
|
BOOST_TEST_EQ( b[2], 3 );
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !BOOST_WORKAROUND(BOOST_GCC, < 40900) && !BOOST_WORKAROUND(BOOST_CLANG_VERSION, < 30800)
|
||||||
|
{
|
||||||
|
boost::array<int, 3> b = boost::to_array({ 1, 2, 3 });
|
||||||
|
|
||||||
|
BOOST_TEST_EQ( b[0], 1 );
|
||||||
|
BOOST_TEST_EQ( b[1], 2 );
|
||||||
|
BOOST_TEST_EQ( b[2], 3 );
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !BOOST_WORKAROUND(BOOST_MSVC, < 1920)
|
||||||
|
{
|
||||||
|
std::unique_ptr<int> a[] = { {}, {}, {} };
|
||||||
|
|
||||||
|
boost::array<std::unique_ptr<int>, 3> b = boost::to_array( std::move( a ) );
|
||||||
|
|
||||||
|
(void)b;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return boost::report_errors();
|
||||||
|
}
|
32
test/to_array_test_cx.cpp
Normal file
32
test/to_array_test_cx.cpp
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
// Copyright 2025 Peter Dimov
|
||||||
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
|
// https://www.boost.org/LICENSE_1_0.txt
|
||||||
|
|
||||||
|
#include <boost/array.hpp>
|
||||||
|
#include <boost/config.hpp>
|
||||||
|
#include <boost/config/pragma_message.hpp>
|
||||||
|
#include <boost/config/workaround.hpp>
|
||||||
|
#include <cstddef>
|
||||||
|
|
||||||
|
#if defined(BOOST_NO_CXX14_CONSTEXPR)
|
||||||
|
|
||||||
|
BOOST_PRAGMA_MESSAGE("Test skipped because BOOST_NO_CXX14_CONSTEXPR is defined")
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
#define STATIC_ASSERT(...) static_assert(__VA_ARGS__, #__VA_ARGS__)
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
{
|
||||||
|
constexpr int a[] = { 1, 2, 3, 4 };
|
||||||
|
constexpr boost::array<int, 4> b = boost::to_array( a );
|
||||||
|
|
||||||
|
STATIC_ASSERT( b[0] == 1 );
|
||||||
|
STATIC_ASSERT( b[1] == 2 );
|
||||||
|
STATIC_ASSERT( b[2] == 3 );
|
||||||
|
STATIC_ASSERT( b[3] == 4 );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
Reference in New Issue
Block a user