First  |  Prev |  Next  |  Last
Pages: 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
How to obtain a typedef for the unsigned version of a signed character type
On 3/7/2010 2:01 PM, JohnW wrote: I want to obtain a typedef for the unsigned version of a signed character type. The example below demonstrates the problem, I have a typedef for a signed character type but don't know how to obtain the corresponding unsigned type. template< class string_t> struct ... 8 Mar 2010 01:01
Arity in C++0x Variadic Class Method
I'd like to define a method which takes twice (say) the number of template parameters which define the class. The following class attempts to use explicit recursion for this, but fails. Does anyone know if this is possible? template <typename Type, typename ... Types> struct Foo { void bar(Type t1, Type t2) ... 17 Mar 2010 12:27
How to obtain a typedef for the unsigned version of a signed character type
On 7 Mrz., 23:01, JohnW <john.wilkinso...(a)yahoo.com> wrote: I want to obtain a typedef for the unsigned version of a signed character type. The example below demonstrates the problem, I have a typedef for a signed character type but don't know how to obtain the corresponding unsigned type. template< c... 8 Mar 2010 01:01
How to obtain a typedef for the unsigned version of a signed character type
I want to obtain a typedef for the unsigned version of a signed character type. The example below demonstrates the problem, I have a typedef for a signed character type but don't know how to obtain the corresponding unsigned type. template< class string_t > struct Example { typedef typename string_t::valu... 7 Mar 2010 17:21
Detecting a static member variable
Hello, I tested the code below on a boost::array<> which defines static const size_type static_size = N; and it fails. See http://www.boost.org/doc/libs/1_42_0/doc/html/boost/array.html By comparison, the commented out code for size(), not static_size works. I use OSX 10.6, gcc 4.2. Any suggestion to sol... 7 Mar 2010 20:40
I keep running into long term c++ programmers who refuse to use exceptions
In article <ebd4c02a-99cc-41c1-8f80-c6baa8a35f1a(a)o3g2000yqb.googlegroups.com>, "WalterHoward(a)gmail.com" <walterhoward(a)gmail.com> wrote: Bad Use: Don't "half-use" exceptions Many programmers, and even the standard library, have the idea that exceptions should be reserved for "fatal" errors only. They ... 5 Apr 2010 19:27
Summary of C++0x Feature Availability
I've put together a summary of C++0x support in gcc and MSVC, and I think this summary may be useful to others. It's now available at http://www.aristeia.com/C++0x/C++0xFeatureAvailability.htm . Both C++0x and compiler support for it are moving targets, so the information in the summary will get out of date over... 7 Apr 2010 01:20
Is "<unsigned type here> var = -1;" specified behavior?
Dear group, is it possible to initialize an unsigned variable with its maximum value with the following lines? unsigned u = -1; std::size_t s = -1; I am asking because the standard does not guarantee overflow behavior of signed types while it does for unsigned types. What applies here? Olaf Klein -- ... 17 Mar 2010 12:27
invalid initialization of non-const reference of type
Hi All, Here is one simple C++ program, if I run this in Visual studio, it will never give error...But in Mac it gives error. class Test { private: public: void TestIt(Test inObj) { //Test &newObj = getObj() ; const Test &newObj = getObj() ; //Error occurs here, error: invalid initialization ... 8 Mar 2010 04:14
GET THE SIZE of struct in the PREPROCESSOR
Hello, i have a structure in my program and i want generate a compile error when the size of structure is not pow of two. my problem is that i don't found the way to get the size of structure in preprocessor mode and it's necessary to generate a COMPILE ERROR when the size of my struct is not pow of 2 :( th... 7 Mar 2010 20:40
First  |  Prev |  Next  |  Last
Pages: 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46