enable-if
std::enable_if specialisation failing
I\'ve been messing around with enable_if, and I seem to have stumbled upon some inconsistent behaviour. This is in VS2010. I\'ve reduced it to the following sample.[详细]
2023-04-09 04:12 分类:问答Why use boost::ice_or instead of || and boost::ice_and instead of && in enable_if?
As question states, is there a reason why people use the struct version over the normal conditionals开发者_JS百科?An excerpt from the Boost Coding Guidelines for Integral Constant Expressions:[详细]
2023-02-18 08:27 分类:问答Can I use boost::enable_if on a member function?
I\'m writing a template class, and I want to allow an additional method to exist only for a certain template type.Currently the method exists for all template types, but causes a compilation error for[详细]
2023-02-08 09:53 分类:问答C++0x type inference messes with boost::enable_if
I\'m trying to write a generic filtering function that performs linear interpolation at a given sampling coordinate in an 开发者_如何学运维multi-dimensional array (arbitrary rank). For this, I need a[详细]
2023-02-06 09:27 分类:问答Loosely coupled implicit conversion
Implicit conversion can be really useful when types are semantically equivalent. For example, imagine two libraries that implement a type identically, but in different namespaces. Or just a type that[详细]
2023-02-04 05:03 分类:问答Why can't the type be deduced in this template function?
template<typename T> std::istream & read(std::istream & istr, typename std::enable_if<std::is_pod<T>::value, T>::type & value)[详细]
2023-01-22 23:15 分类:问答Boost enable_if problem
This is more or less copy pasted from boost docs and I keep getting an error (actually alot of errors)[详细]
2023-01-22 16:45 分类:问答C++ boost enable_if question
Do I have any way to simplify the following statements? (probably, using boost::enable_if). I have a simple class structure - Base base class, Derived1, Derived2 inherit from Base.[详细]
2023-01-18 03:36 分类:问答enable_if and conversion operator?
Any chance to use enable_if with a type conversion operator? Seems tricky, since both retur开发者_如何学运维n type and parameters list are implicit.From the little research I did (and ignoring the c++[详细]
2023-01-04 05:29 分类:问答How can I write a function template for all types with a particular type trait?
Consider the following example: struct Scanner { template <typename T> T get(); }; template <> string Scanner::get()[详细]
2022-12-24 06:23 分类:问答