search for: typename

Displaying 20 results from an estimated 460 matches for "typename".

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.
2017 Jan 16
4
[RFC 0/2] Propose a new pointer trait.
Hi, I'm part of an engineering team doing research on persistent memory support and we have stumbled upon an interesting problem. The issue is, we would like to be able to use the standard library containers in a persistent memory context (think NVDIMM-N). What I mean is that you allocate a container from said memory, use it like you normally would. After the application terminates, expectedly
2009 Sep 13
1
[LLVMdev] Is it possible using anonymous namespace on template in header files.
for example /// getPointerUnionTypeNum - If the argument has type PT1* or PT2* return /// false or true respectively. template <typename PT1, typename PT2> static inline int getPointerUnionTypeNum(PT1 *P) { return 0; } template <typename PT1, typename PT2> static inline int getPointerUnionTypeNum(PT2 *P) { return 1; } template <typename PT1, typename PT2> static inline int getPointerUnionTypeNum(...) { retur...
2009 May 15
2
[LLVMdev] Removing std::vector from APIs (was Re: Mutating the elements of a ConstantArray)
.... That's why they're there. The reason to use the pointer-length pair in preference to iterators is that iterators make templates of everything, causing code bloat. In my code, rather than pass the separate parameters I use a range<Iter> class something like this: template<typename Iter> class range { Iter Begin, End; public: range() : Begin(), End() { } template<typename ConvertibleToRange> range(T &seq) : Begin(seq.begin()), End(seq.end()) { } Iter begin() { return Begin; } Iter end() { return End; } // ... other Sequence methods ... };...
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.
2004 Jun 21
0
Error compiling festival
..._speech_class.h:44, from ../../../../speech_tools/include/EST.h:60, from ../../../src/include/festival.h:44, from modules.cc:41: ../../../../speech_tools/include/EST_THash.h:292: warning: ` EST_TStringHash<V>::IPointer' is implicitly a typename ../../../../speech_tools/include/EST_THash.h:294: warning: ` EST_TStringHash<V>::IPointer' is implicitly a typename ../../../../speech_tools/include/EST_THash.h:303: warning: ` EST_TStringHash<V>::IPointer_k' is implicitly a typename ../../../../speech_tools/include/EST_TH...
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 ... &gt...
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&...
2012 Sep 29
0
[LLVMdev] Clang bug?
...Richard Smith <richard at metafoo.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 ... &gt...
2020 Jun 01
2
virt-v2v: error: redefinition of 'glib_autoptr_clear_OsinfoList'
.../include/glib-2.0/glib-object.h:22, from /usr/include/libosinfo-1.0/osinfo/osinfo.h:28, from libosinfo-c.c:25: /usr/include/glib-2.0/glib/gmacros.h:1028:49: error: redefinition of 'glib_autoptr_clear_OsinfoList' 1028 | #define _GLIB_AUTOPTR_CLEAR_FUNC_NAME(TypeName) glib_autoptr_clear_##TypeName | ^~~~~~~~~~~~~~~~~~~ /usr/include/glib-2.0/glib/gmacros.h:1044:36: note: in expansion of macro '_GLIB_AUTOPTR_CLEAR_FUNC_NAME' 1044 | static G_GNUC_UNUSED inline void _GLIB_AUTOPTR_CLEAR_FUNC_NAME(TypeN...
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:...
2012 Sep 29
0
[LLVMdev] Clang bug?
...s code appears invalid (and G++ rejects 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: n...
2012 Sep 27
4
[LLVMdev] Clang bug?
...am using only one standard header that clang fails to compile properly under C++11 with the new standard library (although the code itself doesn't use any C++11-specific syntax), but G++ (4.6-Ubuntu and 4.2-Darwin) compiles it fine: #include <map> using std::map; template<typename K> struct Templ8 { struct Member { typename map<K,Member*>::iterator it; }; typedef typename map<K,Member*>::iterator iterator_type; }; int main() { Templ8<int> test; } This is the command-line: clang++ -stdlib...
2012 Sep 28
0
[LLVMdev] Clang bug?
...t > clang fails to compile properly under C++11 with the new standard > library (although the code itself doesn't use any C++11-specific > syntax), but G++ (4.6-Ubuntu and 4.2-Darwin) compiles it fine: > > #include <map> > using std::map; > > template<typename K> > struct Templ8 { > struct Member { > typename map<K,Member*>::iterator it; > }; > typedef typename map<K,Member*>::iterator iterator_type; > }; > > int main() { > Templ8<int> test; > } > &...
2020 Jun 01
0
Re: virt-v2v: error: redefinition of 'glib_autoptr_clear_OsinfoList'
...ib-object.h:22, > from /usr/include/libosinfo-1.0/osinfo/osinfo.h:28, > from libosinfo-c.c:25: > /usr/include/glib-2.0/glib/gmacros.h:1028:49: error: redefinition of 'glib_autoptr_clear_OsinfoList' > 1028 | #define _GLIB_AUTOPTR_CLEAR_FUNC_NAME(TypeName) glib_autoptr_clear_##TypeName > | ^~~~~~~~~~~~~~~~~~~ > /usr/include/glib-2.0/glib/gmacros.h:1044:36: note: in expansion of macro '_GLIB_AUTOPTR_CLEAR_FUNC_NAME' > 1044 | static G_GNUC_UNUSED inline void _GLIB_AUTOPTR_CLEAR_...
2011 Jul 09
4
[LLVMdev] type-system-rewrite branch landing tomorrow
...lang self-hosted build (Release+Asserts on Release+Asserts, Linux x86_64) fails with: make[2]: Entering directory `/home/jay/llvm/objdir-self/tools/opt' llvm[2]: Compiling GraphPrinters.cpp for Debug+Asserts build clang: /home/jay/svn/llvm-project/llvm/trunk/include/llvm/Support/Casting.h:194: typename llvm::cast_retty<To, From>::ret_type llvm::cast(const Y&) [with X = llvm::FunctionType, Y = llvm::Type*, typename llvm::cast_retty<To, From>::ret_type = llvm::FunctionType*]: Assertion `isa<X>(Val) && "cast<Ty>() argument of incompatible type!"' fai...
2010 Aug 22
1
Handle RAWSXP in inspect.c:typename()
Hi all I had written a gdb macro to dump the string representation of an SEXPREC type when I realised everything I needed was in inspect.c already in the typename() function. However, the typename function doesnt handle the RAWSXP type, so if possible, could the following patch be applied (I've just put in inline as it is a trivial 1-liner)? Index: src/main/inspect.c =================================================================== --- src/main/inspec...
2012 Nov 29
2
[LLVMdev] [cfe-dev] UB in TypeLoc casting
Moving to LLVM dev to discuss the possibility of extending the cast infrastructure to handle this. On Tue, Nov 20, 2012 at 5:51 PM, John McCall <rjmccall at apple.com> wrote: > On Nov 18, 2012, at 5:05 PM, David Blaikie <dblaikie at gmail.com> wrote: >> TypeLoc casting looks bogus. >> >> TypeLoc derived types return true from classof when the dynamic type >>
2015 Apr 18
2
[LLVMdev] how can I create an SSE instrinsics sqrt?
Thanks, Shahid. It is fixed now. On Fri, Apr 17, 2015 at 8:50 PM, Shahid, Asghar-ahmad < Asghar-ahmad.Shahid at amd.com> wrote: > Hi zhi, > > > > You have to also pass the value type to getDecalaration() API such as > > > > Value* sqrtv = Intrinsic::getDeclaration(M, Intrinsic::x86_sse2_sqrt_pd, > v->getType()); > > > > Regards, > >
2012 Nov 30
0
[LLVMdev] [cfe-dev] UB in TypeLoc casting
...===================================== --- include/llvm/Support/Casting.h (revision 168949) +++ include/llvm/Support/Casting.h (working copy) @@ -203,13 +203,27 @@ // // cast<Instruction>(myVal)->getParent() // -template <class X, class Y> +template <class X, class Y, class S = typename std::enable_if<!std::is_same<Y, typename simplify_type<Y>::SimpleType>::value>::type> inline typename cast_retty<X, Y>::ret_type cast(const Y &Val) { assert(isa<X>(Val) && "cast<Ty>() argument of incompatible type!"); return cast_c...