/* クラス array<> の使用例
*/
#include <algorithm>
#include <functional>
#include <boost/array.hpp>
#include "print.hpp"
using namespace std;
using namespace boost;
int main()
{
// array の生成と初期化
array<int,10> a = { { 1, 2, 3, 4, 5 } };
print_elements(a);
// 要素を直接変更する
for (unsigned i=0; i<a.size(); ++i) {
++a[i];
}
print_elements(a);
// STL アルゴリズムを使って並び順を変える
reverse(a.begin(),a.end());
print_elements(a);
// STL フレームワークを使って要素の否定をとる
transform(a.begin(),a.end(), // source
a.begin(), // destination
negate<int>()); // operation
print_elements(a);
return 0; // Visual-C++ コンパイラのご機嫌をとる
}
- コミュニティ
- Boostライブラリのビルド方法
- メーリングリスト
- 運営メンバ
- Boostを使用しているプロジェクト
-
アーカイブ
-
旧Boost日本語化プロジェクト
-
document
-
各ライブラリの翻訳ドキュメント
- Boost.Compatibilty ライブラリ
- mem_fn.hpp
- §ヘッダファイル(Header) <[boost/static_assert.hpp](http://www.boost.org/doc/libs/1_31_0/boost/static_assert.hpp)>
- Header <[boost/type_traits.hpp](http://www.boost.org/doc/libs/1_31_0/boost/type_traits.hpp)>
- Array wrapper library
-
bind.hpp
-
非推奨: Compose library
-
The Boost Concept Check Library (BCCL)
-
Boost Conversion Library
-
Boost Date-Time Library Documentation
-
Disjoint Sets(互いに素な集合)
-
Boost Format library
-
Header `<boost/function.hpp>`
-
Improved Function Object Adapters
-
the Boost Graph Library
-
io
-
The Boost Lambda Library
-
Boost Math Library
-
Boost.MultiArray
-
Boost Pool Library
-
Boost Preprocessor Library
-
Boost Random Number Library
-
Rational Number Library
-
regex++, Index
-
Boost.Signals
-
Smart Pointer Library
-
The Boost Tuple Library
-
utility
-
document
-
C++オンライン読書会
-
提案予定プロジェクト
-
旧Boost日本語化プロジェクト
-
BoostCon
-
C++Now!
-
ドキュメント
-
editors_doc
-
Boost.勉強会
-
Boost逆引きリファレンス