Thursday, July 4, 2013

decltype extravaganza

OK, I thought C++11 was cool, but I am ending up writing a code like this:



row_assign_ = nomad_allocator<std::remove_pointer<decltype(row_assign_)>::type>().allocate(num_rows_);
// is this really better than
row_assign_ = my_allocator<int>().allocate(num_rows_);
// ...?
view raw gistfile1.cpp hosted with ❤ by GitHub

No comments:

Post a Comment