search for: decltype

Displaying 20 results from an estimated 69 matches for "decltype".

2012 Sep 29
2
[LLVMdev] Clang bug?
On Fri, Sep 28, 2012 at 6:45 PM, Howard Hinnant <hhinnant at apple.com> wrote: > On Sep 28, 2012, at 5:54 PM, Richard Smith <richard at metafoo.co.uk> wrote: > > > Reduced testcase: > > > > template<typename T> struct A { typedef decltype(T() + 0) type; }; > > template<typename T> struct B { > > struct C { typedef typename A<C*>::type type; }; > > typedef typename A<C*>::type type; > > }; > > B<int> b; > > > > ... produces ... > > > > <stdin>:3:3...
2012 Sep 29
0
[LLVMdev] Clang bug?
...foo.co.uk> wrote: > On Fri, Sep 28, 2012 at 6:45 PM, Howard Hinnant <hhinnant at apple.com> wrote: > On Sep 28, 2012, at 5:54 PM, Richard Smith <richard at metafoo.co.uk> wrote: > > > Reduced testcase: > > > > template<typename T> struct A { typedef decltype(T() + 0) type; }; > > template<typename T> struct B { > > struct C { typedef typename A<C*>::type type; }; > > typedef typename A<C*>::type type; > > }; > > B<int> b; > > > > ... produces ... > > > > <stdin>:3:3...
2012 Sep 29
0
[LLVMdev] Clang bug?
On Sep 28, 2012, at 5:54 PM, Richard Smith <richard at metafoo.co.uk> wrote: > Reduced testcase: > > template<typename T> struct A { typedef decltype(T() + 0) type; }; > template<typename T> struct B { > struct C { typedef typename A<C*>::type type; }; > typedef typename A<C*>::type type; > }; > B<int> b; > > ... produces ... > > <stdin>:3:38: error: no type named 'type' in &...
2013 Jan 13
3
[LLVMdev] Using C++'11 language features in LLVM itself
On Sun, Jan 13, 2013 at 2:10 PM, Matthieu Monrocq <matthieu.monrocq at gmail.com> wrote: > gcc 4.5, MSVC 10, clang 3.1 > - decltype v1.0 [1] + late specified return type > - lambda v1.0 [2] > - local types as template arguments > - r-value 2.0 [3] > - static_assert > - built-in type traits This isn't very encouraging. Anecdotally from what I've seen in LLD (whose C++11 feature use is bounded only by MSVC...
2013 Jan 23
0
[LLVMdev] Build Error while building AST lib. (DeclTemplate.h)
...l *getPreviousDeclImpl() { 501 return getPreviousDecl(); 502 } 503 virtual RedeclarableTemplateDecl *getMostRecentDeclImpl() { 504 return getMostRecentDecl(); 505 } 506 507 protected: 508 template <typename EntryType> struct SpecEntryTraits { 509 typedef EntryType DeclType; 510 511 static DeclType *getMostRecentDecl(EntryType *D) { 512 return D->getMostRecentDecl(); 513 } 514 }; 515 516 template <typename EntryType, 517 typename _SETraits = SpecEntryTraits<EntryType>, 518 typename _DeclType = typename _SE...
2013 Jan 14
0
[LLVMdev] Using C++'11 language features in LLVM itself
On Sun, Jan 13, 2013 at 9:59 PM, Sean Silva <silvas at purdue.edu> wrote: > On Sun, Jan 13, 2013 at 2:10 PM, Matthieu Monrocq > <matthieu.monrocq at gmail.com> wrote: > > gcc 4.5, MSVC 10, clang 3.1 > > - decltype v1.0 [1] + late specified return type > > - lambda v1.0 [2] > > - local types as template arguments > > - r-value 2.0 [3] > > - static_assert > > - built-in type traits > > This isn't very encouraging. Anecdotally from what I've seen in LLD > (whose C+...
2013 Jan 13
0
[LLVMdev] Using C++'11 language features in LLVM itself
...; Following the feedback from David, here is an updated list of the profiles, taking into account deprecated versions of the specifications of the lambdas and r-values that might be of interest. As before, they are duly annotated with a remark. gcc 4.3, MSVC 10, clang 3.0 => main benefits are decltype v1.0 [1], static_assert and built-in type traits. gcc 4.4, MSVC 10, clang 3.0 => main additions: late specified return type. gcc 4.5, MSVC 10, clang 3.1 => main additions: lambda v1.0 [2], local types as template arguments, r-value v2.0 [3]. gcc 4.5, MSVC 11, clang 3.1 => main additions...
2012 Sep 28
4
[LLVMdev] Clang bug?
Reduced testcase: template<typename T> struct A { typedef decltype(T() + 0) type; }; template<typename T> struct B { struct C { typedef typename A<C*>::type type; }; typedef typename A<C*>::type type; }; B<int> b; ... produces ... <stdin>:3:38: error: no type named 'type' in 'A<B<int>::C *>' struct...
2013 Jan 13
5
[LLVMdev] Using C++'11 language features in LLVM itself
On Sun, Jan 13, 2013 at 10:26 AM, Tim Northover <t.p.northover at gmail.com> wrote: >> Good points David, I don't feel qualified to evaluate the differences >> between those versions though... Perhaps Richard or Doug could comment here? > > Unless I'm misreading the buildbots, we don't actually have anything > trying to build with MSVC. Have we considered how
2016 Oct 02
15
Using C++14 code in LLVM
...rement is 4.7, which is quite old (almost 4 years for anyone keeping count). What are the challenges with pushing this forward? With VS2015, the biggest remaining missing C++14 features are variable templates, sized allocation, and extended constexpr. But it gains generic lambdas, init-captures, decltype(auto) return, and auto return without requiring the trailing -> decltype syntax. While GCC doesn't claim to "fully" support C++14 until 5.2 (which is only about 1 year old), you can get all of the above features with GCC 4.9 So if we're willing to allow "partial" C+...
2013 Jan 13
2
[LLVMdev] Using C++'11 language features in LLVM itself
...es, listing the base capabilities for the first and > then what each of them adds to the previous one. The version of clang is the > minimum possible adjusted so as not to limited what the gcc/MSVC combination > provides. > > > gcc 4.3, MSVC 10, clang 3.0 > => main benefits: decltype v1.0 [2], static_assert and built-in type traits. > > gcc 4.4, MSVC 10, clang 3.0 > => main additions: late specified return type. > > gcc 4.5, MSVC 10, clang 3.0 > => only addition (sorry Chris): local types as template arguments. FWIW - I'd hope to argue in favor of a...
2013 Jan 13
0
[LLVMdev] Using C++'11 language features in LLVM itself
...age. I drew up a list of profiles, listing the base capabilities for the first and then what each of them adds to the previous one. The version of clang is the minimum possible adjusted so as not to limited what the gcc/MSVC combination provides. gcc 4.3, MSVC 10, clang 3.0 => main benefits: decltype v1.0 [2], static_assert and built-in type traits. gcc 4.4, MSVC 10, clang 3.0 => main additions: late specified return type. gcc 4.5, MSVC 10, clang 3.0 => only addition (sorry Chris): local types as template arguments. gcc 4.5, MSVC 11, clang 3.1 => main additions: atomic, lambda v1.1,...
2013 Jan 13
0
[LLVMdev] Using C++'11 language features in LLVM itself
...ities for the first and >> then what each of them adds to the previous one. The version of clang is the >> minimum possible adjusted so as not to limited what the gcc/MSVC combination >> provides. >> >> >> gcc 4.3, MSVC 10, clang 3.0 >> => main benefits: decltype v1.0 [2], static_assert and built-in type traits. >> >> gcc 4.4, MSVC 10, clang 3.0 >> => main additions: late specified return type. >> >> gcc 4.5, MSVC 10, clang 3.0 >> => only addition (sorry Chris): local types as template arguments. > > FWIW - I&...
2013 Jan 11
4
[LLVMdev] Using C++'11 language features in LLVM itself
On Fri, Jan 11, 2013 at 11:32 AM, Sebastian Redl <sebastian.redl at getdesigned.at> wrote: > > On 11.01.2013, at 20:08, Eli Bendersky wrote: > >>>> I suppose this tradeoff can be evaluated by looking at the delta >>>> between 4.5 and 4.6 which is actually supported by MSVC 2010 and Clang >>>> 3.1 >>> >>> Makes perfect sense to
2016 Oct 03
2
Using C++14 code in LLVM
...ears for >> anyone keeping count). What are the challenges with pushing this forward? >> >> With VS2015, the biggest remaining missing C++14 features are variable >> templates, sized allocation, and extended constexpr. But it gains generic >> lambdas, init-captures, decltype(auto) return, and auto return without >> requiring the trailing -> decltype syntax. > > I'm not convinced that the cost is worth the gain for these features. > Most of these are relatively straight forward (with more boilerplate) to > work around in C++11, and I'd rath...
2017 Nov 14
1
OrcJIT + CUDA Prototype for Cling
...                                                                      >                                       >     return Obj; >   } > >   std::unique_ptr<TargetMachine> TM; >   const DataLayout DL; >   RTDyldObjectLinkingLayer ObjectLayer; >   ObjectTransformLayer<decltype(ObjectLayer), >                        decltype(&KaleidoscopeJIT::dumpObject)> > DumpObjectsLayer; >   IRCompileLayer<decltype(DumpObjectsLayer), SimpleCompiler> CompileLayer; > > public: >   using ModuleHandle = decltype(CompileLayer)::ModuleHandleT; > >   Kale...
2016 Nov 26
5
Placement new and TBAA
...l. > In that case, i would expect it to work. The PR says "passes with -fno-strict-aliasing”, my understanding is that it is failing only with the TBAA indeed. You don’t need the main and the union to reproduce, extracting foo() alone in its single own file is enough: void *operator new(decltype(sizeof 0), void *) noexcept; float *qq; void foo(int *p, int *q, long unk) { for (long i = 0; i < unk; ++i) { ++*p; qq = new (static_cast<void *>(&q[i])) float(42); } } LICM will get the store to p out of the loop, conceptually turning it into: void foo(int *p, int...
2013 Jan 14
1
[LLVMdev] Using C++'11 language features in LLVM itself
...ocq at gmail.com> wrote: > > > On Sun, Jan 13, 2013 at 9:59 PM, Sean Silva <silvas at purdue.edu> wrote: > >> On Sun, Jan 13, 2013 at 2:10 PM, Matthieu Monrocq >> <matthieu.monrocq at gmail.com> wrote: >> > gcc 4.5, MSVC 10, clang 3.1 >> > - decltype v1.0 [1] + late specified return type >> > - lambda v1.0 [2] >> > - local types as template arguments >> > - r-value 2.0 [3] >> > - static_assert >> > - built-in type traits >> >> This isn't very encouraging. Anecdotally from what I'v...
2012 Sep 29
0
[LLVMdev] Clang bug?
...jects it with a similar "no type named ..." error message), whereas the original code is valid C++ (both C++98 and C++11). On Fri, Sep 28, 2012 at 3:54 PM, Richard Smith <richard at metafoo.co.uk> wrote: > Reduced testcase: > > template<typename T> struct A { typedef decltype(T() + 0) type; }; > template<typename T> struct B { > struct C { typedef typename A<C*>::type type; }; > typedef typename A<C*>::type type; > }; > B<int> b; > > ... produces ... > > <stdin>:3:38: error: no type named 'type' in ...
2020 Mar 10
4
RFC: Making a common successor/predecessor interface
...ross the need to have a common interface for accessing >> successors/predecessors in various IR units, such that a type such as >> `typename NodeT::succ_iterator` could be used in templated code. >> > > I /think/ this can be achieved with the existing API by using > "decltype(succ_begin(std::declval<NodeT>()))" instead of the typename > you've got as an example (it looks like succ_begin is the extension point - > but the problem you're having is naming its return type? decltype would be > one option) - you could make a trait wrapper around th...