内部にジェネレーターを取り、double を返す関数があるタプルを作成しようとしています。
私はまだそれを実装するのに苦労しています。
これまでのところ、私はそのような行を機能させようとしています:
auto g = boost::random::uniform_real_distribution<>().operator()<boost::random::mt19937>;
理想的には次のように使用します
#include <boost/random.hpp>
main()
{
//I want to see all boost distribution as std::function<double(boost::random::mt19937)>
auto g = boost::random::uniform_real_distribution<>().operator()<boost::random::mt19937>;
boost::random::mt19937 f(0);
double x = g(f);
}
私は何かが欠けています (確かに operator() がテンプレート化されているという事実) が、auto でコンパイルされない理由がわかりません。