Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
comp . lang . c++ . moderated
This is a Usenet group - learn more
Find or start a Google Group about c++.
Group info
Language: English
Group categories:
Computers > Programming
More group info »
Discussions
View:  Topic list, Topic summary Topics 1 - 10 of 27154  Older »
Description: Technical discussion of the C++ language. (Moderated)
 

Difference between if and ternary operator 
  Hi! The output of the example below is "CopyMove". Should not it be "MoveMove" ? If not, why is it so ? I tried this with GCC 4.7, VS 10, and VS11 Beta. All the compilers return "CopyMove". Thank you very much for the answer. PK. // --- ...using namespace std; struct CBigData { CBigData() {}... more »
By peter.kub...@gmail.com  - May 20 - 5 new of 5 messages    

message processing using template 
  Hi, Suppose there are messages required to process. the code would look like this. void process (int type) { if (type == MSG_TYPE_A) { processMsgA(); } else if (type == MSG_TYPE_B) { processMsgB(); } ... I would like to know if it is possible to use template to achieve the... more »
By kira kira  - May 18 - 6 new of 6 messages    

Broken interaction between std::priority_queue and move-only types 
  Let's say you've got a move-only type (such as std::unique_ptr< T > or std::packaged_task) with an associated Compare functor that defines some kind of ordering on objects of the move-only type: struct Node; std::priority_queue< std::unique_ptr< Node >, std::vector< std::unique_ptr< Node > >,... more »
By Zoltan Juhasz  - May 17 - 16 new of 16 messages    

how to make a simple generic function... parameterized by collection & value 
  This is a followup to a mailing with the same subject. I had v. helpful replies from wasti.r...@gmx.net and Daniel Krügler and have now progressed to this: template<typename T> using Validator = std::function<T(*)(const std::string&)>; template<typename C> Validator<typename C::value_type>... more »
By Mark Summerfield  - May 17 - 6 new of 6 messages    

postfix operator++ 
  { Though this question may seem trivial, it may also be confusing and tricky in light of the series of relevant changes in the standard, so hopefully the follow-ups will clear up the issue. -mod } hello guys, I am kind of puzzled by one simple c++ constuct. What should be the value of x after the statement:... more »
By ravinder thakur  - May 17 - 27 new of 27 messages    

Help writing a functor binder 
  Hi all, I am a bit stuck on how to achieve something I want to do and was wondering if anyone can point me to somewhere where I can find a pattern that may help me implement this. I started implementing something and kept running into the problem of needing to specialize for two things at once:... more »
By Brendon  - May 16 - 2 new of 2 messages    

taking abs() of min signed int value 
  Hi, I need to compute the absolute value of the minimum signed int value for each signed integral type. This value isn't representable as a signed int, but it is representable as an unsigned int. This is easy when a larger signed type is available: int32_t min_int32 = std::numeric_limits<int32_t>:: min();... more »
By Jeremy Todd  - May 16 - 4 new of 4 messages    

How to find an enum's underlying type? 
  A web search comes up with a variety of syntax: std::underlying_type<E>::type std::EnumeratedType<T>::underl yingType etc. etc. None seem to work with gcc4.6.3. -- [ See [link] for info about ] [ comp.lang.c++.moderated. First time posters: Do this! ]... more »
By Ivan Godard  - May 16 - 5 new of 5 messages    

Getting the smallest signed type that can represent all the values of a given unsigned type 
  Hi all, The subject explains itself. Let's say you have a pair of objects, a and b, of an unsigned integer type U, and you want to calculate their difference in a signed integer type. Obviously you cannot simply write "a - b", because that will yield an unsigned integer value in modulo arithmetic. So you want to write... more »
By Seungbeom Kim  - May 16 - 8 new of 8 messages    

Threads: incompatibilities between C and C++? 
  Recently I watched a speech made by Hans Boehm on Channel #9 where he mentioned an incompatibility between C11 and C++11. I think he was talking about a difference between thread libraries. Does anyone know what these differences consist of? MJ -- [ See [link] for info about ]... more »
By M J  - May 14 - 12 new of 12 messages    

1 - 10 of 27154   « Newer | Older »

XML