Google Groups Home
Help | Sign in
comp . lang . c++ . moderated
This is a Usenet group - learn more
Find or start a Google Group about c++.
Active older topics
Related Groups
Discussion about C++ language, library, standards. (Moderated)
Low activity, Usenet
The object-oriented C++ language.
High activity, Usenet
The C programming language. (Moderated)
Low activity, Usenet
Discussions
View:  Topic list, Topic summary Topics 1 - 10 of 24603  Older »
Description: Technical discussion of the C++ language. (Moderated)
 

Can a constexpr function throw an exception?! 
  I see that in N2798, the bitset::test function is now constexpr bool test(size_t pos) const; but is still required to throw an out_of_range exception for an invalid pos parameter. ...constexpr function to be { return expression; } where the expression is supposed to be a "potential constant expression (5.19)". However 5.19 specifically lists a throw expression... more »
By Bo Persson  - Oct 10 - 1 new of 1 message    

fine Tabu 
  Joseph wrote on 10 Oct 2008 09:48:27 GMT: ...[link]
By roxanne.var...@aol.com  - Oct 10 - 1 new of 1 message    

stringstream misunderstanding 
  Why won't this work? stringstream ss; ss.str() = "have a nice day."; cout << ss.str() << endl; I know that ss << "have a nice day."; works, but I thought the str() function would permit me to read to write to the ss buffer. Thanks, Joe
By joe.foxho...@gmail.com  - Oct 9 - 17 new of 17 messages    

Why the decision to leave typeinfo::name() out of the standard? 
  Hi, Basically, this little string right here, could be extremely helpful if it was portable. Couldn't the standard committee just come up with a simple scheme for this? namespace::classname? I'm writing a serialization lib and it's damn hard to make it portable without it. Does anyone know why it never got to be in the standard?... more »
By Sebastian Karlsson  - Oct 9 - 4 new of 4 messages    

explicit conversion from unique_ptr<T> to shared_ptr<T> 
  DR #674 declares the construction of a shared_ptr<T> from a unique_ptr<T> && as being explicit, possibly to mimic the behavior of the construction from an auto_ptr<T> in C++03 days. Is there a real need for it to be declared explicit, now that we have rvalue references? Since only construction from rvalue references are accepted (opposed... more »
By Rodolfo Lima  - Oct 8 - 1 new of 1 message    

operator++(int); 
  Hi, I'll start with a quote from D&E, page 246. It's about how to distinguish ++i from i++ when overloading operator++ for decltype(i). "Several alternatives that did not involve new keywords were suggested. For example: class Ptr_to_X { // ... X ++operator(); //prefix ++ X& operator++(); //postfix ++... more »
By Matthias Berndt  - Oct 7 - 3 new of 3 messages    

destruction of std::map, heap corruption 
  { Note that questions are better answered when posted with a minimal, compilable standard C++ code by relevant definitions supplied and irrelevant dependency upon proprietary features removed. Responders are encouraged to stay within the standard C++. -mod } Hello, msvc2005 (main.cpp and another .cpp in a DLL)... more »
By Hicham Mouline  - Oct 7 - 2 new of 2 messages    

catch match 
  What should this code output ? ...class my_exception : std::exception { public: static void foo() { try { throw my_exception(); } catch(const std::exception&) { std::cout << 1 << std::endl; } catch(const my_exception&) { std::cout << 2 << std::endl;... more »
By gute...@gmail.com  - Oct 6 - 12 new of 12 messages    

Iteration over the structure fields 
  Is there any quick and neat way to perform some repeated operation over all the fields of a structure without repeating the same code for each individual field? E.g., instead of writing this struct some_struct {float field1; int field2; double field3; /*many other fields*/}; some_struct a_struct; f (a_struct.field1);... more »
By robn1...@gmail.com  - Oct 6 - 2 new of 2 messages    

Conversions in template functions 
  While learning function templates I wrote below program to understand better. The compiler output is also given below. The doubt that I've here is that why is the compiler doing conversion of double(1.1980) to int when it can convert int to double (to "wider one") and could use template generated function(my_max<double>(double ,double)) rather than handwritten... more »
By Bharath  - Oct 5 - 6 new of 6 messages    

1 - 10 of 24603   « Newer | Older »

XML      
Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google