20int main(
int argc,
char **argv)
29 JParser<> zap(
"Example program to test fixed length array class.");
35 catch(
const exception &error) {
36 FATAL(error.what() << endl);
69 typedef JArray<N-1,
int> JArray2_t;
73 for (JArray1_t::iterator i =
array.begin(); i !=
array.end(); ++i) {
77 if (
debug >= debug_t) {
79 copy(
array.begin(),
array.end(), ostream_iterator<int>(cout,
" "));
86 for (
int i = 0; i != N; ++i) {
92 JArray2_t buffer =
array.pop_front();
94 if (
debug >= debug_t) {
96 copy(buffer.begin(), buffer.end(), ostream_iterator<int>(cout,
" "));
100 for (
int i = 0; i != N-1; ++i) {
106 JArray1_t buffer(
array.pop_back(),
array[N-1]);
112 JArray2_t buffer =
array.pop_back();
114 if (
debug >= debug_t) {
116 copy(buffer.begin(), buffer.end(), ostream_iterator<int>(cout,
" "));
120 for (
int i = 0; i != N-1; ++i) {
131 if (
debug >= debug_t) {
132 copy(p3.begin(), p3.end(), ostream_iterator<int>(cout,
" "));
140 if (
debug >= debug_t) {
141 copy(p2.begin(), p2.end(), ostream_iterator<int>(cout,
" "));
149 if (
debug >= debug_t) {
150 copy(
p1.begin(),
p1.end(), ostream_iterator<int>(cout,
" "));
163 key.second.first = 1;
169 if (
debug >= debug_t) {
170 copy(
array.begin(),
array.end(), ostream_iterator<int>(cout,
" "));