vs msvc-7.1 const array
- deduceされた配列にconstを付けるとpartial specializationがいっさい効かなくなるvc-7.1のバグの回避策を発見…実装
- これでようやくconstと書くことができる
- 今まではconstの代わりにboost::add_constを関数の宣言のところに書かなければいけなかった
template<class A> struct spec; template<class T, std::size_t N> struct spec< T[N] > { BOOST_STATIC_ASSERT(N == 3); typedef T* type; }; template<class A> struct indirection : spec<PSTADE_EGG_ARRAY_RESURRECT(A)> {}; template<class A> typename indirection<A const>::type foo(A const& a) { return 0; };