【C++】template 統合スレ -- STL/Boost/Loki, etc.
■ このスレッドは過去ログ倉庫に格納されています
0001デフォルトの名無しさん
NGNG以下のスレッドを統合するスレです。
STLスレッド
Part1 http://pc.2ch.net/tech/kako/1004/10042/1004287394.html
Part2 http://pc3.2ch.net/test/read.cgi/tech/1026793823/
【C++】Boost使い集まれ!
http://pc3.2ch.net/test/read.cgi/tech/1033830935/
Generic Programming with C++ Template
http://pc.2ch.net/tech/kako/1008/10085/1008593126.html
関連スレ、その他リンクは >>2-5 あたりに。
0002デフォルトの名無しさん
NGNGC++相談室 part12
http://pc3.2ch.net/test/read.cgi/tech/1035005882/
リンク
STLPort
http://www.stlport.org/
boost
http://www.boost.org/
Loki
http://freshmeat.net/projects/lokilibrary/
http://www.geocities.com/rani_sharoni/LokiPort.html
ISO/IEC 14882
Programming languages -- C++
http://webstore.ansi.org/ansidocstore/product.asp?sku=ISO%2FIEC+14882%2D1998
http://www.kuzbass.ru/docs/isocpp/
0003デフォルトの名無しさん
NGNG0004デフォルトの名無しさん
NGNGこのスレに統合するってことで。
0005デフォルトの名無しさん
NGNG乙カレー
0006デフォルトの名無しさん
NGNG0007デフォルトの名無しさん
NGNG0008デフォルトの名無しさん
NGNG乙ー
0009デフォルトの名無しさん
NGNG0010デフォルトの名無しさん
NGNG・boost info
http://user.ecc.u-tokyo.ac.jp/~g940455/wp/boost/
・Hattareme Programming
http://www.dodgson.org/lab/hat/
・Let's boost
http://www.kmonos.net/alang/boost/
・Regex
http://www.s34.co.jp/cpptechdoc/article/regexpp/
・Boostを使おう
http://www.emaki.minidns.net/Programming/tools/Boost/
0011デフォルトの名無しさん
NGNGマターリ逝きましょう
0012デフォルトの名無しさん
NGNGclass B {};
class D : public B {};
std::auto_ptr<B> f()
{
  std::auto_ptr<D> p;
  return p;
}
↑の一見通りそうだけど、エラーになります。
test.cpp:9: no matching function for call to `std::auto_ptr<B>::auto_ptr(
std::auto_ptr<B>)'
/usr/include/c++/3.1.1/memory:346: candidates are:
std::auto_ptr<_Tp>::auto_ptr(std::auto_ptr_ref<_Tp>) [with _Tp = B]
/usr/include/c++/3.1.1/memory:216:
std::auto_ptr<_Tp>::auto_ptr(std::auto_ptr<_Tp1>&) [with _Tp1 = B, _Tp = B]
/usr/include/c++/3.1.1/memory:203:
std::auto_ptr<_Tp>::auto_ptr(std::auto_ptr<_Tp>&) [with _Tp = B]
test.cpp:9: initializing temporary from result of `
std::auto_ptr<_Tp>::operator std::auto_ptr<_Tp1>() [with _Tp1 = B, _Tp = D]'
とりあえず、
  return std::auto_ptr<B>( p );
で、エラーにならなくなるようです。
この修正が妥当なんでしょうか?
■ このスレッドは過去ログ倉庫に格納されています