search for: sfinae

Displaying 20 results from an estimated 23 matches for "sfinae".

2014 Aug 18
4
[LLVMdev] [RFC] Raising minimum required Visual Studio version to 2013 for trunk
...e of a bunch of C++11 features that are not supported by MSVC 2012. According to MSDN (http://msdn.microsoft.com/en-us/library/hh567368.aspx) the list is: * Non-static data member initializers * Variadic templates * Initializer lists * Default template arguments for function templates * Expression SFINAE * Alias templates * Delegating constructors * Explicit conversion operators * Raw string literals * Defaulted and deleted functions Questions, comments, concerns, general feedback? -Chris
2014 Mar 03
3
[LLVMdev] C++11 reverse iterators (was C++11 is here)
On 3 March 2014 12:32, Pete Cooper <peter_cooper at apple.com> wrote: > Would those work with a foreach construct? Perhaps I forgot to mention that was what I'm trying to work out here. > > In example 3 I was wondering if we could define a method reverse(). We could use sfinae to wrap that around rbegin/rend if people like that style? Sorry, I was too terse... ;) If MF is a reverse_iterator, it'd just work, no? But to get the reverse iterator, I think reverse() would be the best general pattern, since you can adapt it to each container needs. cheers, --renato
2014 Mar 03
3
[LLVMdev] [cfe-dev] C++11 reverse iterators (was C++11 is here)
...Cooper <peter_cooper at apple.com> wrote: > >> Would those work with a foreach construct? Perhaps I forgot to mention > that was what I'm trying to work out here. > >> > >> In example 3 I was wondering if we could define a method reverse(). We > could use sfinae to wrap that around rbegin/rend if people like that style? > > > > Sorry, I was too terse... ;) > > > > If MF is a reverse_iterator, it'd just work, no? But to get the > > reverse iterator, I think reverse() would be the best general pattern, > > since you ca...
2007 Jul 04
1
[LLVMdev] API design (and Boost and tr1)
...the teamplte versions that take iterators. Unfortunately, there is at least one place in llvm where a CallInst is constructed with two AllocaInst pointers. Because the template constructor is a better match, it is selected over the Value * constructors. To get around this problem, I've used SFINAE to remove the template constructors from the overload set when passed pointers to classes derived from Value: namespace detail { template<bool value> struct disable_if {}; template<> struct disable_if<false> { typedef int type; }; } /// CallInst...
2014 Mar 03
2
[LLVMdev] C++11 reverse iterators (was C++11 is here)
On 3 March 2014 12:13, Pete Cooper <peter_cooper at apple.com> wrote: > It would also be good to agree on a way to handle reverse iterators, especially on those which already use begin() and end() for going forwards. For example rbegin() and rend()? --renato
2014 Mar 04
3
[LLVMdev] [cfe-dev] C++11 reverse iterators (was C++11 is here)
...Cooper <peter_cooper at apple.com> wrote: > >> Would those work with a foreach construct? Perhaps I forgot to mention > that was what I'm trying to work out here. > >> > >> In example 3 I was wondering if we could define a method reverse(). We > could use sfinae to wrap that around rbegin/rend if people like that style? > > > > Sorry, I was too terse... ;) > > > > If MF is a reverse_iterator, it'd just work, no? But to get the > > reverse iterator, I think reverse() would be the best general pattern, > > since you ca...
2014 Aug 18
2
[LLVMdev] [RFC] Raising minimum required Visual Studio version to 2013 for trunk
...2. According to MSDN ( > http://msdn.microsoft.com/en-us/library/hh567368.aspx) the list is: > > > > * Non-static data member initializers > > * Variadic templates > > * Initializer lists > > * Default template arguments for function templates > > * Expression SFINAE > > * Alias templates > > * Delegating constructors > > * Explicit conversion operators > > * Raw string literals > > * Defaulted and deleted functions > > > > Questions, comments, concerns, general feedback? > > We shifted the minimum MSVC version to...
2014 Aug 22
5
[LLVMdev] [RFC] Raising LLVM minimum required MSVC version to 2013 for trunk
...e of a bunch of C++11 features that are not supported by MSVC 2012. According to MSDN (http://msdn.microsoft.com/en-us/library/hh567368.aspx) the list is: * Non-static data member initializers * Variadic templates * Initializer lists * Default template arguments for function templates * Expression SFINAE * Alias templates * Delegating constructors * Explicit conversion operators * Raw string literals * Defaulted and deleted functions From the discussion on LLVM-dev it is also believed that this may ease some development pain as people keep occasionally breaking LLVM trunk by using language feature...
2014 Mar 03
2
[LLVMdev] [cfe-dev] C++11 reverse iterators (was C++11 is here)
...2:32, Pete Cooper <peter_cooper at apple.com> wrote: > >> Would those work with a foreach construct? Perhaps I forgot to mention that was what I'm trying to work out here. > >> > >> In example 3 I was wondering if we could define a method reverse(). We could use sfinae to wrap that around rbegin/rend if people like that style? > > > > Sorry, I was too terse... ;) > > > > If MF is a reverse_iterator, it'd just work, no? But to get the > > reverse iterator, I think reverse() would be the best general pattern, > > since you ca...
2014 Aug 21
3
[LLVMdev] [RFC] Raising minimum required Visual Studio version to 2013 for trunk
...en-us/library/hh567368.aspx) the list is: > >> > > >> > * Non-static data member initializers > >> > * Variadic templates > >> > * Initializer lists > >> > * Default template arguments for function templates > >> > * Expression SFINAE > >> > * Alias templates > >> > * Delegating constructors > >> > * Explicit conversion operators > >> > * Raw string literals > >> > * Defaulted and deleted functions > >> > > >> > Questions, comments, concerns, gen...
2014 Aug 21
4
[LLVMdev] [RFC] Raising minimum required Visual Studio version to 2013 for trunk
...spx) the list is: >> >> > >> >> > * Non-static data member initializers >> >> > * Variadic templates >> >> > * Initializer lists >> >> > * Default template arguments for function templates >> >> > * Expression SFINAE >> >> > * Alias templates >> >> > * Delegating constructors >> >> > * Explicit conversion operators >> >> > * Raw string literals >> >> > * Defaulted and deleted functions >> >> > >> >> > Questi...
2007 Jul 03
4
[LLVMdev] API design
On Monday 02 July 2007 16:26, Chris Lattner wrote: > On Sun, 1 Jul 2007, Nick Lewycky wrote: > > I've been running LLVM with _GLIBCXX_DEBUG (extra checks) turned on to > > see what would happen, and it's been a complete disaster. Well, that's a bit harsh, isn't it? It's finding bugs, just like it's supposed to. :) I believe I've started to run into
2007 Jul 04
0
[LLVMdev] API design (and Boost and tr1)
On Wed, 4 Jul 2007, David A. Greene wrote: > On Monday 02 July 2007 23:24, David A. Greene wrote: >>>> - Changing the API >>>> a) Template it to take two iterators. This causes code size bloat. >> >> This seems like the right solution to me. Unless llvm is running on >> extremely limited memory embedded systems, the extra code space >>
2007 Jul 04
2
[LLVMdev] API design (and Boost and tr1)
...ers. There are several places that look like this: Value *array = { v1, v2, v3, v4}; blah = new CallInst(...,&array[0], 4,...); Since array doesn't have begin/end members we'd need some kind of specialization for that case. Iterators nicely avoid this issue. I agree that the SFINAE technique is complicated and esoteric. I'd rather find something more intuitive. But then again, it is the way "modern C++" is heading. It's actually a quite common technique in C++ generic programming. So it's not really so out of the mainstream....
2012 Sep 29
1
[LLVMdev] Clang bug?
...f instantiating map<K,Member*>, creating a dependency cycle between the two instantiations). I'm not at all clear on whether that is permissible behavior for a standard library implementation, but it still seems to be a problem in some cases. libc++'s is_assignable implementation uses SFINAE on this: decltype((_VSTD::declval<_Tp>() = _VSTD::declval<_Arg>(), true_type())) Now, our case was: _Tp = Member*&, _Arg = Member*. In that case, we use the built-in assignment operator, which produces an lvalue of type Member*. Then we perform argument-dependent lookup looking...
2014 Mar 05
2
[LLVMdev] [cfe-dev] C++11 reverse iterators (was C++11 is here)
...2:32, Pete Cooper <peter_cooper at apple.com> wrote: > >> Would those work with a foreach construct? Perhaps I forgot to mention that was what I'm trying to work out here. > >> > >> In example 3 I was wondering if we could define a method reverse(). We could use sfinae to wrap that around rbegin/rend if people like that style? > > > > Sorry, I was too terse... ;) > > > > If MF is a reverse_iterator, it'd just work, no? But to get the > > reverse iterator, I think reverse() would be the best general pattern, > > since you ca...
2018 Jan 24
2
[llvm] r322838 - [ADT] Split optional to only include copy mechanics and dtor for non-trivial types.
...> // could be made more efficient by passing by value, possibly unifying > them > // with the rvalue versions above - but this could place a different > set of > // requirements (notably: the existence of a default ctor) when > implemented > // in that way. Careful SFINAE to avoid such pitfalls would be required. > - Optional &operator=(const T &y) { > + OptionalStorage &operator=(const T &y) { > if (hasVal) > - **this = y; > + *getPointer() = y; > else { > new (storage.buffer) T(y); > hasVa...
2018 Jan 24
0
[llvm] r322838 - [ADT] Split optional to only include copy mechanics and dtor for non-trivial types.
...e more efficient by passing by value, possibly unifying >> them >> // with the rvalue versions above - but this could place a different >> set of >> // requirements (notably: the existence of a default ctor) when >> implemented >> // in that way. Careful SFINAE to avoid such pitfalls would be >> required. >> - Optional &operator=(const T &y) { >> + OptionalStorage &operator=(const T &y) { >> if (hasVal) >> - **this = y; >> + *getPointer() = y; >> else { >> new (st...
2018 Jan 24
1
[llvm] r322838 - [ADT] Split optional to only include copy mechanics and dtor for non-trivial types.
...e, possibly > unifying > >> them > >> // with the rvalue versions above - but this could place a different > >> set of > >> // requirements (notably: the existence of a default ctor) when > >> implemented > >> // in that way. Careful SFINAE to avoid such pitfalls would be > >> required. > >> - Optional &operator=(const T &y) { > >> + OptionalStorage &operator=(const T &y) { > >> if (hasVal) > >> - **this = y; > >> + *getPointer() = y; > >>...
2014 Sep 30
4
[LLVMdev] [cfe-dev] [RFC] Raising LLVM minimum required MSVC version to 2013 for trunk
...ccording to MSDN > > (http://msdn.microsoft.com/en-us/library/hh567368.aspx) the list is: > > > > * Non-static data member initializers > > * Variadic templates > > * Initializer lists > > * Default template arguments for function templates > > * Expression SFINAE > > * Alias templates > > * Delegating constructors > > * Explicit conversion operators > > * Raw string literals > > * Defaulted and deleted functions > > > > From the discussion on LLVM-dev it is also believed that this may ease > some > > develo...