search for: is_ptr

Displaying 4 results from an estimated 4 matches for "is_ptr".

Did you mean: as_ptr
2009 May 15
0
[LLVMdev] Removing std::vector from APIs (was Re: Mutating the elements of a ConstantArray)
On Friday 15 May 2009 05:50, Jay Foad wrote: > > 3. Any comments on the patch itself? > > > > The one major thing to be aware of is that it isn't safe to use &V[0] > > when V is an empty std::vector > > Oh dear. That's a bit of a flaw in the plan. I suppose the solution is > to switch to SmallVector whenever this might be a problem. Or use iterators.
2009 May 15
2
[LLVMdev] Removing std::vector from APIs (was Re: Mutating the elements of a ConstantArray)
...StructType::get(v.empty()? 0 : &v[0], v.empty()? 0 : &v[0] + v.size()); // becomes StructType::get(ptr_range(v)); Two important refinements… First, the above can be made safer so that ptr_range will reject e.g. std::list with a bit of metaprogramming: template<typename T> struct is_ptr { enum { value = false }; }; template<typename T> struct is_ptr<T*> { enum { value = true }; }; template<typename T> struct is_contiguous_sequence { enum { value = is_ptr<T::iterator>::value }; }; template<typename T, typename Alloc> struct is_contiguous_sequence&lt...
2009 May 15
3
[LLVMdev] Removing std::vector from APIs (was Re: Mutating the elements of a ConstantArray)
> 3. Any comments on the patch itself? > > The one major thing to be aware of is that it isn't safe to use &V[0] when V > is an empty std::vector Oh dear. That's a bit of a flaw in the plan. I suppose the solution is to switch to SmallVector whenever this might be a problem. I'm a bit concerned that any new &empty[0] problems that are introduced will go unnoticed.
2014 Mar 21
0
Wine release 1.7.15
...svc: Implement SchRpcRegisterTask. schedsvc: Implement SchRpcRetrieveTask. taskschd: Implement ITaskService::get_HighestVersion. schedsvc: Mark service as auto-start once a task is registered. schedsvc: Replace external trace statements by internal versions. widl: Move is_ptr() and is_array() to header.h and make them inline. widl: Unify indentation of comments. widl: Move is_void(), is_declptr() and is_conformant_array() to header.h and make them inline. ntdll/tests: Always wait until the operation completes if returned status is STATUS_PENDING. Erik...