http://groups.google.com/group/comp.lang.c++?hl=en
comp.lang.c++@googlegroups.com
Today's topics:
* PODs, Constructors and the Boost uuid Class - 1 messages, 1 author
http://groups.google.com/group/comp.lang.c++/t/a115833b71eecd59?hl=en
* ♣ Y(^o^)Y♣wholesale cheap fashionable Jeans etc at www.ecyaya.com - 2
messages, 1 author
http://groups.google.com/group/comp.lang.c++/t/ec21821ae5b2c095?hl=en
* Paypal payment Discount Wholesale/Retail Gucci Shoes GUCCI Boots LV Shoes LV
Boots D&G Shoes UGG Boots etc Brand shoes (http://www.vipchinatrade.com) - 1
messages, 1 author
http://groups.google.com/group/comp.lang.c++/t/5bcfbaf481b06bd9?hl=en
* இ◥இ◤ 2010 HOT Sale AAA True Leather brand handbags (Chanel handbag, Gucci
handbag, LV handbag......) at www.rijing-trade.com <paypal payment> - 1
messages, 1 author
http://groups.google.com/group/comp.lang.c++/t/395632b40df9b671?hl=en
* Test if a std::fstream is open - 2 messages, 1 author
http://groups.google.com/group/comp.lang.c++/t/de2f719f62b0fc0e?hl=en
* Style guides for C and/or C++ - 3 messages, 3 authors
http://groups.google.com/group/comp.lang.c++/t/3543d1f01ca9b305?hl=en
* Cheap wholesale UGG boots Jordan shoes (http://www.vipchinatrade.com) - 1
messages, 1 author
http://groups.google.com/group/comp.lang.c++/t/de91548ad75ace00?hl=en
* ★~★~★ 2010 Cheap price wholesale Nike Air Max shoes at website http://www.
rijing-trade.com <Paypal Payment> - 1 messages, 1 author
http://groups.google.com/group/comp.lang.c++/t/33a551a46cb884d4?hl=en
* Motivation of software professionals - 1 messages, 1 author
http://groups.google.com/group/comp.lang.c++/t/21a3fdec4dd53e6a?hl=en
* ☆°ω°☆cheap wholesale brand shoes at www.ecyaya.com (paypal payment) - 1
messages, 1 author
http://groups.google.com/group/comp.lang.c++/t/b0dcc1c0168bfb9d?hl=en
* Cheap Wholesale Nike Air Max 87 Air Max LTD Air Max 90 etc (http://www.
vipchinatrade.com) - 1 messages, 1 author
http://groups.google.com/group/comp.lang.c++/t/610b9630bd5045de?hl=en
* Why A Big Difference between C++98 and C++0x on a local type as a template-
argument? - 1 messages, 1 author
http://groups.google.com/group/comp.lang.c++/t/2c411d40c5c4017e?hl=en
* Loop generates never-ending sockets and threads, need help debugging - 2
messages, 2 authors
http://groups.google.com/group/comp.lang.c++/t/bfb43e94d5fe70d1?hl=en
* Classes named CFoo (was Re: Odd Exception Behavior) - 1 messages, 1 author
http://groups.google.com/group/comp.lang.c++/t/ce3a580936f3cddd?hl=en
* Incomplete types and std::vector - 4 messages, 1 author
http://groups.google.com/group/comp.lang.c++/t/b0741c38fc15b5f7?hl=en
* This one seem silent on this too - 3 messages, 1 author
http://groups.google.com/group/comp.lang.c++/t/0bb66ac02fab6d19?hl=en
==============================================================================
TOPIC: PODs, Constructors and the Boost uuid Class
http://groups.google.com/group/comp.lang.c++/t/a115833b71eecd59?hl=en
==============================================================================
== 1 of 1 ==
Date: Sat, Feb 6 2010 10:10 pm
From: "Alf P. Steinbach"
* ng2010:
> From http://www.boost.org/doc/libs/1_42_0/libs/uuid/uuid.html and in the
> section titled "POD Efficiencies", they give a workaround to the
> defficiency/oversight in C++ that a POD cannot have constructors:
>
> class uuid_class : public boost::uuids::uuid
> {
> public:
> uuid_class() // def ctor shouldn't auto gen IMO else this
> // class should be called auto_uuid or something
No, that would be unsound design. There is already the POD class if you want an
uninitialized UUID instance. This class would serve no purpose if did nothing. :-)
> : boost::uuids::uuid(boost::uuids::random_generator()())
> {}
>
> explicit uuid_class(boost::uuids::uuid const& u)
> : boost::uuids::uuid(u)
> {}
>
> operator boost::uuids::uuid() {
> return static_cast<boost::uuids::uuid&>(*this);
> }
>
> operator boost::uuids::uuid() const {
> return static_cast<boost::uuids::uuid const&>(*this);
> }
> };
>
> What I don't understand is why the conversion operators in uuid_class
> above guarantee anything more than just having defined boost::uuids::uuid
> as a class with the constructors given above. The conversion operators
> for the operators are just casting *this. Why the operators at all when
> uuid_class IS a uuid?
It appears to be meaningless.
With Boost stuff one can never say for sure because those guys are very very
heavily into SFINAE and other subtle template metaprogramming magic and other
at-the-very-front-edge things (I think that's a problem with Boost), but at
least for ordinary programming it's meaningless to have the operators above.
But notwithstanding my comment about Boost intricacies I'm fairly sure that it's
an error, perhaps something left from an earlier version with private
inheritance, because this class lacks an assignment operator that directly takes
a POD argument, and although it will work without it (via value conversion)
that's inefficient so if this example had been quality checked then that
assignment operator would have been there, so, it's not been checked.
Cheers & hth.,
- Alf
==============================================================================
TOPIC: ♣ Y(^o^)Y♣wholesale cheap fashionable Jeans etc at www.ecyaya.com
http://groups.google.com/group/comp.lang.c++/t/ec21821ae5b2c095?hl=en
==============================================================================
== 1 of 2 ==
Date: Sun, Feb 7 2010 12:15 am
From: hero
♣ Y(^o^)Y♣wholesale cheap fashionable Jeans etc at www.ecyaya.com
wholesale cheap Affliction Jean with high quality and low price at
www.ecyaya.com
wholesale cheap Ed Hardy Jean with high quality and low price at
www.ecyaya.com
wholesale cheap Armani Jean with high quality and low price at www.ecyaya.com
wholesale cheap Christian Audigier Jean with high quality and low
price at www.ecyaya.com
wholesale cheap Akademiks Jean with high quality and low price at
www.ecyaya.com
wholesale cheap Bape Jean with high quality and low price at www.ecyaya.com
wholesale cheap Black Label Jean with high quality and low price at
www.ecyaya.com
wholesale cheap Coogi Jean with high quality and low price at www.ecyaya.com
wholesale cheap Crown Holder Jean with high quality and low price at
www.ecyaya.com
wholesale cheap D&G Jean with high quality and low price at www.ecyaya.com
wholesale cheap Diesel Jean with high quality and low price at www.ecyaya.com
wholesale cheap Ecko Unltd Jean with high quality and low price at
www.ecyaya.com
wholesale cheap Evisu Jean with high quality and low price at www.ecyaya.com
wholesale cheap G-Star Jean with high quality and low price at www.ecyaya.com
wholesale cheap Gucci Jean with high quality and low price at www.ecyaya.com
wholesale cheap Iceberg Jean with high quality and low price at www.ecyaya.com
wholesale cheap Jack&Jones Jean with high quality and low price at
www.ecyaya.com
wholesale cheap Justcavalli Jean with high quality and low price at
www.ecyaya.com
wholesale cheap Kanji Jean with high quality and low price at www.ecyaya.com
wholesale cheap LEVI'S Jean with high quality and low price at www.ecyaya.com
wholesale cheap LRG Jean with high quality and low price at www.ecyaya.com
wholesale cheap LV Jean with high quality and low price at www.ecyaya.com
wholesale cheap Rock Jean with high quality and low price at www.ecyaya.com
wholesale cheap True Relig Jean with high quality and low price at
www.ecyaya.com
wholesale cheap Versace Jean with high quality and low price at www.ecyaya.com
== 2 of 2 ==
Date: Sun, Feb 7 2010 12:15 am
From: hero
♣ Y(^o^)Y♣wholesale cheap fashionable Jeans etc at www.ecyaya.com
wholesale cheap Affliction Jean with high quality and low price at
www.ecyaya.com
wholesale cheap Ed Hardy Jean with high quality and low price at
www.ecyaya.com
wholesale cheap Armani Jean with high quality and low price at www.ecyaya.com
wholesale cheap Christian Audigier Jean with high quality and low
price at www.ecyaya.com
wholesale cheap Akademiks Jean with high quality and low price at
www.ecyaya.com
wholesale cheap Bape Jean with high quality and low price at www.ecyaya.com
wholesale cheap Black Label Jean with high quality and low price at
www.ecyaya.com
wholesale cheap Coogi Jean with high quality and low price at www.ecyaya.com
wholesale cheap Crown Holder Jean with high quality and low price at
www.ecyaya.com
wholesale cheap D&G Jean with high quality and low price at www.ecyaya.com
wholesale cheap Diesel Jean with high quality and low price at www.ecyaya.com
wholesale cheap Ecko Unltd Jean with high quality and low price at
www.ecyaya.com
wholesale cheap Evisu Jean with high quality and low price at www.ecyaya.com
wholesale cheap G-Star Jean with high quality and low price at www.ecyaya.com
wholesale cheap Gucci Jean with high quality and low price at www.ecyaya.com
wholesale cheap Iceberg Jean with high quality and low price at www.ecyaya.com
wholesale cheap Jack&Jones Jean with high quality and low price at
www.ecyaya.com
wholesale cheap Justcavalli Jean with high quality and low price at
www.ecyaya.com
wholesale cheap Kanji Jean with high quality and low price at www.ecyaya.com
wholesale cheap LEVI'S Jean with high quality and low price at www.ecyaya.com
wholesale cheap LRG Jean with high quality and low price at www.ecyaya.com
wholesale cheap LV Jean with high quality and low price at www.ecyaya.com
wholesale cheap Rock Jean with high quality and low price at www.ecyaya.com
wholesale cheap True Relig Jean with high quality and low price at
www.ecyaya.com
wholesale cheap Versace Jean with high quality and low price at www.ecyaya.com
==============================================================================
TOPIC: Paypal payment Discount Wholesale/Retail Gucci Shoes GUCCI Boots LV
Shoes LV Boots D&G Shoes UGG Boots etc Brand shoes (http://www.vipchinatrade.
com)
http://groups.google.com/group/comp.lang.c++/t/5bcfbaf481b06bd9?hl=en
==============================================================================
== 1 of 1 ==
Date: Sun, Feb 7 2010 12:34 am
From: tradenow
Cheap Wholesale Gucci Shoes (paypal payment)
(www.vipchinatrade.com )
Cheap Wholesale GUCCI Boots
Cheap Wholesale Lacoste Shoes
Cheap Wholesale LV Shoes (paypal payment)
(www.vipchinatrade.com )
Cheap Wholesale LV Boots
Cheap Wholesale Prada Shoes (paypal payment)
(www.vipchinatrade.com )
Cheap Wholesale Timberland Shoes
Cheap Wholesale D&G Shoes (paypal payment)
(www.vipchinatrade.com )
Cheap Wholesale D&G Boots
Cheap Wholesale Puma Shoes
Cheap Wholesale Puma AAA (paypal payment)
(www.vipchinatrade.com )
Cheap Wholesale UGG Boots Shoes
Cheap Wholesale Bikkem Bergs Shoes (free shipping)
Cheap Wholesale Mauri Shoes Man
Cheap Wholesale Versace Shoes (paypal payment)
(www.vipchinatrade.com )
Cheap Wholesale Versace Boots
Cheap Wholesale Paul Smith Shoes (free shipping)
Cheap Wholesale BOSS Shoes
Cheap Wholesale Burberry Shoes (paypal payment)
(www.vipchinatrade.com )
Cheap Wholesale Dsquared shoes
Cheap Wholesale Dior Shoes (free shipping)
Cheap Wholesale Dior Boots
Cheap Wholesale ED Hardy Shoes (paypal payment)
(www.vipchinatrade.com )
Cheap Wholesale ED Hardy Boots
Cheap Wholesale ED Hardy Shoes Man (paypal payment)
(www.vipchinatrade.com )
Cheap Wholesale Fendi Shoes (paypal payment)
(www.vipchinatrade.com )
Cheap Wholesale Fendi Boots
Cheap Wholesale AFF Shoes (paypal payment)
(www.vipchinatrade.com )
Cheap Wholesale Evisu Shoes (free shipping)
Cheap Wholesale 4US Shoes
Cheap Wholesale Sebago Shoes (paypal payment)
(www.vipchinatrade.com )
Cheap Wholesale Supra Shoes
Cheap Wholesale Hight Converse Shoes (paypal payment)
(www.vipchinatrade.com )
Cheap Wholesale Coach Boots
Cheap Wholesale Coach Shoes
Women Christian Louboutin (paypal payment)
(www.vipchinatrade.com )
Cheap Wholesale Chanel Shoes
Cheap Wholesale Chanel Boots (free shipping)
Cheap Wholesale Bape Shoes
Cheap Wholesale Adidas Shoes (paypal payment)
(www.vipchinatrade.com )
Cheap Wholesale Adicolor (free shipping)
Cheap Wholesale Adidas 35TH (paypal payment)
(www.vipchinatrade.com )
Cheap Wholesale Adidas NBA
Cheap Wholesale Adidas Running (paypal payment)
(www.vipchinatrade.com )
Cheap Wholesale Adidas Y3
Cheap Wholesale Soccer Shoes (paypal payment)
(www.vipchinatrade.com )
==============================================================================
TOPIC: இ◥இ◤ 2010 HOT Sale AAA True Leather brand handbags (Chanel handbag,
Gucci handbag, LV handbag......) at www.rijing-trade.com <paypal payment>
http://groups.google.com/group/comp.lang.c++/t/395632b40df9b671?hl=en
==============================================================================
== 1 of 1 ==
Date: Sun, Feb 7 2010 12:45 am
From: "www.fjrjtrade.com"
இ◥இ◤ 2010 HOT Sale AAA True Leather brand handbags (Chanel handbag,
Gucci handbag, LV handbag......) at www.rijing-trade.com <paypal
payment>
Cheap wholesale handbags www.rijing-trade.com
Cheap wholesale AAA True Leather handbags www.rijing-trade.com
Cheap wholesale Burberry Handbags AAA
Cheap wholesale Burberry Purse AAA
Cheap wholesale D&G Handbags AAA
Cheap wholesale Fendi Handbags AAA
Cheap wholesale Hermes Handbags AAA
Cheap wholesale Kooba Handbags AAA
Cheap wholesale Loewe Handbags AAA
Cheap wholesale Marc Jacobs Handbags AAA
Cheap wholesale Mulberry Handbags AAA
Cheap wholesale Prada Handbags AAA
Cheap wholesale Thomaswlde Handbags AAA
Cheap wholesale Valentnv Handbags AAA
Cheap wholesale Versace Handbags AAA
Cheap wholesale Balenciaga Handbags AAA
Cheap wholesale Balenciaga Purse AAA
Cheap wholesale Bally Purse AAA
Cheap wholesale Boss purse AAA
Cheap wholesale Chanel Handbags AAA
Cheap wholesale Chanel Purse AAA
Cheap wholesale Chloe Handbags AAA
Cheap wholesale Coach Handbags AAA
Cheap wholesale Miumiu Handbags AAA
Cheap wholesale Dior Handbags AAA
Cheap wholesale Gucci Handbags AAA
Cheap wholesale Gucci Purse AAA
Cheap wholesale Hermes Purse AAA
Cheap wholesale JIMMY CHOO Handbags AAA
Cheap wholesale LV Handbags AAA
Cheap wholesale LV Purse AAA
More brand items at website:
http://www.rijing-trade.com
==============================================================================
TOPIC: Test if a std::fstream is open
http://groups.google.com/group/comp.lang.c++/t/de2f719f62b0fc0e?hl=en
==============================================================================
== 1 of 2 ==
Date: Sun, Feb 7 2010 12:46 am
From: Rune Allnor
Hi all.
Suppose I have a std::fstream, that my application needs to
close and start over (e.g. a log file that needs to be closed and a
new one started, every now and then).
I have attempted to do things along such lines as:
std::ofstream log;
if (time_to_start_new_log_file())
{
std::string fname = new_log_file_name();
// Troublesome test ////////////////////////
if (log) // Test if the log file is already open
{
log.close();
}
log.open(fname.c_str());
}
This does not work as intended.
I always interpreted the if(log) test as a test if the file
is open, but can't find anything definitive in Stroustrup's
"The C++ Programming Language".
However, in his "Programming. Principle and Practice
using C++" Stroustrup says about the test (p. 385)
that is checks whether the opening operation resulted
in the stream being "... in a good() state:
ifstream if(name);
if (!if) // oops! we couldn't open that file ... "
In other words, it seems the test if(log) returns the
value of the std::ios_base::goodbit, which is a completely
different thing than the open/close state.
So:
1) What does the test if(log) above actually test for?
2) How can one test whether the std::xfstream is already open?
And for good measure,
3) Is there anything about closing files in the standard
std::xfstream destructors? Or do I need to to add some kind of
if(*this,isOpen()) this->close();
test in the desctructors of classes derived from std::xfstream?
Rune
== 2 of 2 ==
Date: Sun, Feb 7 2010 3:50 am
From: Rune Allnor
On 7 Feb, 09:46, Rune Allnor <all...@tele.ntnu.no> wrote:
> 2) How can one test whether the std::xfstream is already open?
Never mind, I eventually found the std::fstream::is_open() member
function.
Rune
==============================================================================
TOPIC: Style guides for C and/or C++
http://groups.google.com/group/comp.lang.c++/t/3543d1f01ca9b305?hl=en
==============================================================================
== 1 of 3 ==
Date: Sun, Feb 7 2010 12:56 am
From: Robert Fendt
And thus spake Jorgen Grahn <grahn+nntp@snipabacken.se>
6 Feb 2010 23:26:51 GMT:
> You'll get no consensus or summary, that's for sure. Too many
> different styles and opinions.
Maybe one should quote from Marshall Cline's (excellent) C++ FAQ here:
http://www.parashift.com/c++-faq-lite/coding-standards.html#faq-27.1
"27.1 What are some good C++ coding standard?
[...] Obviously anyone who asks this question wants to be trained so they don't run off on their own ignorance, but nonetheless posting a question such as this one to comp.lang.c++ tends to generate more heat than light. [...]"
Which is very much to the point, actually. The question of which style exactly is 'superior' is moot. Just choose one and stick with it. If you are working with other people, just choose one (together!) and then stick with it. When reading code written by other people, I (like most even semi-experienced C++ programmers) usually do not really care about subtle differences in indentation and such, as long as (1) there *is* some level of indentation to make block levels clear, (2) it is readable and (3) *consistent*.
Consistency is key. To that end, source code formatters like astyle and the like can help you. But of course they do not support every formatting style on the planet, just what their authors deemed popular and/or sensible. So using e.g. astyle limits your choices, which can also mean that your code formatting style implicitely gets less 'individual' thus making it easier for others to read. Which can be a positive effect as well.
Regards,
Robert
== 2 of 3 ==
Date: Sun, Feb 7 2010 4:41 am
From: Krice
On 19 tammi, 21:33, Marcelo Pinto <mpint...@gmail.com> wrote:
> - Don't use Hungarian notation
HN could be good sometimes. I'm using HN in enums and
sometimes in classes, like G_Screen (G=graphics) to make it
easier to find/list them in class browser.
== 3 of 3 ==
Date: Sun, Feb 7 2010 8:21 am
From: Jonathan Lee
On Feb 7, 7:41 am, Krice <pau...@mbnet.fi> wrote:
> HN could be good sometimes. I'm using HN in enums and
> sometimes in classes, like G_Screen (G=graphics) to make it
> easier to find/list them in class browser.
Something I prefer is to put enums in a namespace or
class. So "G_Screen" becomes "Graphics::Screen".
--Jonathan
==============================================================================
TOPIC: Cheap wholesale UGG boots Jordan shoes (http://www.vipchinatrade.com)
http://groups.google.com/group/comp.lang.c++/t/de91548ad75ace00?hl=en
==============================================================================
== 1 of 1 ==
Date: Sun, Feb 7 2010 5:30 am
From: tradenow
Cheap wholesale Jordan shoes
Discount Nike air max
Discount Nike Shox
Discount Air force one shoes
Discount Christian Louboutin shoes clothes
Discount G-star Jeans
http://www.vipchinatrade.com
==============================================================================
TOPIC: ★~★~★ 2010 Cheap price wholesale Nike Air Max shoes at website http://
www.rijing-trade.com <Paypal Payment>
http://groups.google.com/group/comp.lang.c++/t/33a551a46cb884d4?hl=en
==============================================================================
== 1 of 1 ==
Date: Sun, Feb 7 2010 5:30 am
From: "www.fjrjtrade.com"
Cheap wholesale Nike Air Max 2006
Cheap wholesale Nike Air Max 92 Man
Cheap wholesale Nike Air Max CLSSIC BW
Cheap wholesale Nike Air Max Skyline
Cheap wholesale Nike Air Max Tailwind
Cheap wholesale Air Max 09
Cheap wholesale Air Max 87
Cheap wholesale Air Max 89
Cheap wholesale Air Max 90
Cheap wholesale Air Max 91
Cheap wholesale Air Max 93
Cheap wholesale Air Max 95
Cheap wholesale Air Max 180
Cheap wholesale Air Max 97
Cheap wholesale Air Max LTD
Cheap wholesale Air Max STAB
Cheap wholesale Air Max TN
==============================================================================
TOPIC: Motivation of software professionals
http://groups.google.com/group/comp.lang.c++/t/21a3fdec4dd53e6a?hl=en
==============================================================================
== 1 of 1 ==
Date: Sun, Feb 7 2010 7:04 am
From: Nick Keighley
On 5 Feb, 11:19, Stefan Kiryazov <stefan.kirya...@gmail.com> wrote:
> Hi all,
>
> I am doing a research about motivation in software development, the
> most efficient practices to motivate software engineers, their
> popularity, etc.
>
> As a part of the research, I am doing an online survey for software
> engineers and managers in software development. It takes just several
> minutes and filling it is a good opportunity to share your opinion
> about the motivation practices being used in the software industry
> today:http://ask.wizefish.com/en/MotivationSurvey.aspx
>
> Anyone who does the survey and leaves any contacts will be sent the
> results.
>
> Also, if someone is running a web site or blog dedicated to any aspect
> of software development we can do some link exchange.
>
> Regards,
> Stefan Kiryazov
==============================================================================
TOPIC: ☆°ω°☆cheap wholesale brand shoes at www.ecyaya.com (paypal payment)
http://groups.google.com/group/comp.lang.c++/t/b0dcc1c0168bfb9d?hl=en
==============================================================================
== 1 of 1 ==
Date: Sun, Feb 7 2010 7:50 am
From: hero
☆°ω°☆cheap wholesale brand shoes at www.ecyaya.com (paypal payment)
Cheap Wholesale Gucci Shoes (paypal payment)
(www.ecyaya.com.cn )
Cheap Wholesale GUCCI Boots
Cheap Wholesale Lacoste Shoes
Cheap Wholesale LV Shoes (paypal payment)
(www.ecyaya.com.cn )
Cheap Wholesale LV Boots
Cheap Wholesale Prada Shoes (paypal payment)
(www.ecyaya.com.cn )
Cheap Wholesale Timberland Shoes
Cheap Wholesale D&G Shoes (paypal payment)
(www.ecyaya.com.cn )
Cheap Wholesale D&G Boots
Cheap Wholesale Puma Shoes
Cheap Wholesale Puma AAA (paypal payment)
(www.ecyaya.com.cn )
Cheap Wholesale UGG Boots Shoes
Cheap Wholesale Bikkem Bergs Shoes (free shipping)
Cheap Wholesale Mauri Shoes Man
Cheap Wholesale Versace Shoes (paypal payment)
(www.ecyaya.com.cn )
Cheap Wholesale Versace Boots
Cheap Wholesale Paul Smith Shoes (free shipping)
Cheap Wholesale BOSS Shoes
Cheap Wholesale Burberry Shoes (paypal payment)
(www.ecyaya.com.cn )
Cheap Wholesale Dsquared shoes
Cheap Wholesale Dior Shoes (free shipping)
Cheap Wholesale Dior Boots
Cheap Wholesale ED Hardy Shoes (paypal payment)
(www.ecyaya.com.cn )
Cheap Wholesale ED Hardy Boots
Cheap Wholesale ED Hardy Shoes Man (paypal payment)
(www.ecyaya.com.cn )
Cheap Wholesale Fendi Shoes (paypal payment)
(www.ecyaya.com.cn )
Cheap Wholesale Fendi Boots
Cheap Wholesale AFF Shoes (paypal payment)
(www.ecyaya.com.cn )
Cheap Wholesale Evisu Shoes (free shipping)
Cheap Wholesale 4US Shoes
Cheap Wholesale Sebago Shoes (paypal payment)
(www.ecyaya.com.cn )
Cheap Wholesale Supra Shoes
Cheap Wholesale Hight Converse Shoes (paypal payment)
(www.ecyaya.com.cn )
Cheap Wholesale Coach Boots
Cheap Wholesale Coach Shoes
Women Christian Louboutin (paypal payment)
(www.ecyaya.com.cn )
Cheap Wholesale Chanel Shoes
Cheap Wholesale Chanel Boots (free shipping)
Cheap Wholesale Bape Shoes
Cheap Wholesale Adidas Shoes (paypal payment)
(www.ecyaya.com.cn )
Cheap Wholesale Adicolor (free shipping)
Cheap Wholesale Adidas 35TH (paypal payment)
(www.ecyaya.com.cn )
Cheap Wholesale Adidas NBA
Cheap Wholesale Adidas Running (paypal payment)
(www.ecyaya.com.cn )
Cheap Wholesale Adidas Y3
Cheap Wholesale Soccer Shoes (paypal payment)
(www.ecyaya.com.cn )
==============================================================================
TOPIC: Cheap Wholesale Nike Air Max 87 Air Max LTD Air Max 90 etc (http://www.
vipchinatrade.com)
http://groups.google.com/group/comp.lang.c++/t/610b9630bd5045de?hl=en
==============================================================================
== 1 of 1 ==
Date: Sun, Feb 7 2010 7:58 am
From: tradenow
Cheap Wholesale Nike Air Max 87
Cheap Wholesale Nike Air Max 89
Cheap Wholesale Nike Air Max 90
Cheap Wholesale Nike Air Max 91
Cheap Wholesale Nike Air Max 92 Man
Cheap Wholesale Nike Air Max 93
Cheap Wholesale Nike Air Max 95
Cheap Wholesale Nike Air Max 97
Cheap Wholesale Nike Air Max 180 Man
Cheap Wholesale Nike Air Max 2006
Cheap Wholesale Nike Air Max 2009
Cheap Wholesale Nike Air Max Clssic BW
Cheap Wholesale Nike Air Max LTD
Cheap Wholesale Nike Air Max Skyline
Cheap Wholesale Nike Air Max STAB
Cheap Wholesale Nike Air Max Tailwind
Cheap Wholesale Nike Air Max TN
http://www.vipchinatrade.com
==============================================================================
TOPIC: Why A Big Difference between C++98 and C++0x on a local type as a
template-argument?
http://groups.google.com/group/comp.lang.c++/t/2c411d40c5c4017e?hl=en
==============================================================================
== 1 of 1 ==
Date: Sun, Feb 7 2010 9:03 am
From: James Kanze
On Feb 6, 4:55 pm, "Bo Persson" <b...@gmb.dk> wrote:
> xmllmx wrote:
> > C++98 14.3.1 explicitly says as follows:
[...]
> > In my view, the new rules without restrictions are intuitive, easy
> > to use for programmers and easy to implement for compilers. What
> > makes me most puzzled is the hidden reason for the authors of C++98
> > to put such counterintuitive restrictions on compilers and on us
> > innocent programmers? What's the WHY behind the C++98 restrictions?
> The restriction was there beacuse nobody spent enough time to figure
> out what it should mean. If you have two struct S in two different
> functions, will that get you one or two X<S>'s?
I don't think that there was ever any question concerning what
it should mean. Classes defined in separate functions are
distinct types, and always have been, so distinct instantiations
are needed.
There was some question concerning how this could or should be
implemented. A class defined inside a function isn't visible
outside the function, so how could a template instantiation
refer to its members.
> 10 years later, the committee has figured this out , and agreed that
> template <class T> class X {};
> void f()
> {
> struct S {};
> X<S> x3; // error: local type used as template-argument
> }
> can be compiled as
> template <class T> class X {};
> namespace
> {
> struct S {};
> }
> void f()
> {
> X<S> x3; // error: local type used as template-argument
> }
> which has been legal and well defined all along.
It's a bit more complicated than that. What happens if you have
two functions in the same translation unit which both define a
class S?
I think that the real reason had to do with implementability.
At the time the last revision of the standard was being
finalized, most template implementations used something more or
less similar to textual replacement, and there was probably some
worry that such systems couldn't cope with elements that were
out of scope.
--
James Kanze
==============================================================================
TOPIC: Loop generates never-ending sockets and threads, need help debugging
http://groups.google.com/group/comp.lang.c++/t/bfb43e94d5fe70d1?hl=en
==============================================================================
== 1 of 2 ==
Date: Sun, Feb 7 2010 12:55 pm
From: Brian
On Feb 6, 5:16 pm, Jorgen Grahn <grahn+n...@snipabacken.se> wrote:
> On Sat, 2010-02-06, Branimir Maksimovic wrote:
> > Kurt wrote:
> > While on the subject of threads and sockets,
> >> do you have any books to recommend?
>
> > Unix network programming, Richard Stevens.
> >http://en.wikipedia.org/wiki/W._Richard_Stevens
>
> Although that's for Unix, and the poster appeared to use some other
> system. Stevens covers Unix and its variations, but not e.g. Windows.
>
> For threads, I think you need more than Stevens -- I don't think he
> teaches you to avoid all the pitfalls which makes all threaded code
> I've seen a complicated, inefficient, and broken mess.
>
I'm no threading expert, but I've seen some multithreaded
applications that I don't think were inefficient or a
broken mess. I've also seen software that used more
threads than seemed necessary. It could have been called
messy, but I don't think it would have been appropriate
to call it a broken mess.
Brian Wood
http://webEbenezer.net
== 2 of 2 ==
Date: Sun, Feb 7 2010 3:26 pm
From: James Kanze
On Feb 6, 11:16 pm, Jorgen Grahn <grahn+n...@snipabacken.se> wrote:
> On Sat, 2010-02-06, Branimir Maksimovic wrote:
> > Kurt wrote:
> >> While on the subject of threads and sockets, do you have
> >> any books to recommend?
>
> > Unix network programming, Richard Stevens.
> >http://en.wikipedia.org/wiki/W._Richard_Stevens
> Although that's for Unix, and the poster appeared to use some
> other system. Stevens covers Unix and its variations, but not
> e.g. Windows.
I've heard that sockets are similar enough under both that you
might be able to use some of the Stevens under Windows. I'm not
sure, however.
> For threads, I think you need more than Stevens -- I don't
> think he teaches you to avoid all the pitfalls which makes all
> threaded code I've seen a complicated, inefficient, and broken
> mess.
I'm not too familiar with this particular book of his, but in
general, Stevens delves into the details of each individual
request, and does not address architecture or larger scale
issues. The best book I've seen for threading (where program
organization is very, very critical) is _Programming with POSIX
Threads_, by David Butenhof. As the name indicates, the book is
purely Unix, but as far as I can tell, most of the issues it
explains are identical under Windows. Only the names of the
functions change.
--
James Kanze
==============================================================================
TOPIC: Classes named CFoo (was Re: Odd Exception Behavior)
http://groups.google.com/group/comp.lang.c++/t/ce3a580936f3cddd?hl=en
==============================================================================
== 1 of 1 ==
Date: Sun, Feb 7 2010 1:29 pm
From: "Bo Persson"
Jorgen Grahn wrote:
> On Thu, 2010-02-04, none wrote:
>> Alf P. Steinbach wrote:
> ...
>>> * "C"-prefix for a class is a Microsoft-ism, therefore (almost
>>> automatically)
>>> ungood.
>>
>> Guilty as charged. I've been using the "C" prefix since the early
>> days of Visual Studio.
>
> More generally: I see this class CFoo scheme in a lot of postings
> here. Why do people use it, *really*?
>
> Microsoft may have had some reason to use it back in the 1980s or
> so, before namespaces, before C++ was widely adopted, before their
> programmers knew the language well, and they may have to keep it for
> backwards-compatible reasons.
>
> But that doesn't imply that *everyone else* has to use it, in their
> own code, for new classes, in 2010. It provides no information and
> is just in the way.
>
> Are there broken tools in Microsoft-land which require it?
> Misinformation in popular books? What?
>
Just people following a bad example. "If the big guys at Microsoft do
it this way, of course it must be good."
Bo Persson
==============================================================================
TOPIC: Incomplete types and std::vector
http://groups.google.com/group/comp.lang.c++/t/b0741c38fc15b5f7?hl=en
==============================================================================
== 1 of 4 ==
Date: Sun, Feb 7 2010 3:00 pm
From: James Kanze
On Feb 4, 11:07 pm, "Leigh Johnston" <le...@i42.co.uk> wrote:
> > I've doubtlessly read it, but I'm not convinced. I repeat:
> > what does std::auto_ptr buy you, compared to a raw pointer?
> std::auto_ptr buys you ownership semantics with RAII (no
> memory leak if exception is thrown during construction of
> class owning the pimpl object). The alternative is to write
> your own version of something similar to std::auto_ptr but why
> bother? I will use unique_ptr instead when it is available.
Sorry, but that's just false. Whether you use auto_ptr or a raw
pointer changes absolutely nothing during construction.
> It is silly saying a <memory> dependency is undesirable.
It's not really a big point, but why add the dependency if it
doesn't buy you anything.
--
James Kanze
== 2 of 4 ==
Date: Sun, Feb 7 2010 3:05 pm
From: James Kanze
On Feb 5, 9:21 pm, "Leigh Johnston" <le...@i42.co.uk> wrote:
> "Juha Nieminen" <nos...@thanks.invalid> wrote in message
> news:hki1dc$1jhf$1@adenine.netfront.net...
> > Leigh Johnston wrote:
> >>> I've doubtlessly read it, but I'm not convinced. I
> >>> repeat: what does std::auto_ptr buy you, compared to a raw
> >>> pointer?
> >> std::auto_ptr buys you ownership semantics with RAII (no
> >> memory leak if exception is thrown during construction of
> >> class owning the pimpl object). The alternative is to write
> >> your own version of something similar to std::auto_ptr but
> >> why bother?
> > I think that the point is that using std::auto_ptr in the
> > pimpl idiom doesn't save much work. You still need to write
> > an explicit destructor (and possibly constructor) and forbid
> > copying and assignment of the class. Basically you are more
> > or less simply changing a "delete data;" in the destructor
> > to a "std::auto_ptr" in the class declaration. Not much of a
> > saving.
> It is still a saving and saves you from using local
> (automatic) auto_ptrs in the constructor body especially if
> the class has more than one pimpl object (think about
> exception safety - a bad_alloc exception could be thrown if
> you create more than one pimpl object or anything else that
> could throw an exception in the constructor body).
If your main object contains more than one pointer, it's not the
compilation firewall idiom---you're doing something else, and
other rules apply. And as long as there's only one pointer,
auto_ptr buys you absolutely nothing.
> "delete data;" in the destructor would never be called if the
> constructor body throws an exception.
There is no "constructor body" in the compilation firewall
idiom. The constructor, by definition, is simply:
MyType::MyType(...) : myImpl( new Impl(...) ) {}
Anything else, and you're not talking about the compilation
firewall idiom, but something else.
> RAII is one of the features that makes C++ great, not using it
> is plain silly.
Like everything else, you use it when appropriate. When it buys
you something.
(And using smart pointers in a class object really isn't the
normal use of RAII, which depends on deterministic destructor
call.)
--
James Kanze
== 3 of 4 ==
Date: Sun, Feb 7 2010 3:12 pm
From: James Kanze
On Feb 6, 6:07 am, Joshua Maurice <joshuamaur...@gmail.com> wrote:
> On Feb 5, 1:21 pm, "Leigh Johnston" <le...@i42.co.uk> wrote:
> > "Juha Nieminen" <nos...@thanks.invalid> wrote in message
> My 2 cents: Generally when I use pimpl, it's
> //header
> #include <string>
> class Foo
> {
> public:
> Foo();
> ~Foo();
> std::string getName() const; //ex func
> //etc.
> private:
> class FooImpl;
> FooImpl * impl;
> };
> //cpp
> class Foo::FooImpl
> {
> public:
> //impl
> };
> Foo::Foo() : impl(new Foo::FooImpl) {}
> Foo::~Foo() { delete impl; }
> std::string Foo::getName() const { /*return impl->getName();*/ return
> "";
> }
> //end example
> Most uses of pimpl are as simple as this.
That's how Herb Sutter defined it, and since he invented the
term, I think it just adds to the confusion if you decide to use
some other definition. (It's not a term like OO, which already
has hundreds of subtly different definitions.)
> I would be skeptical of a design which had "multiple pimpl
> pointers". The constructor body of Foo is generally that, no
> more, no less, give or take the names. However, I suppose
> there's nothing to lose by using std::auto_ptr either.
Except for an additional include in the header, no. And perhaps
a false sense of security; typically, when you use auto_ptr in
an object, you don't need to provide a user defined destructor.
> Finally, I feel stupid. Could someone explain to me how this
> works, how std::auto_ptr::~auto_ptr "finds" the name Foo as a
> complete type? Probably something to do with template lookup
> rules, the two phase lookup, lookup based on instantiation
> context and declaring context, and the rest of that nastiness.
> Playing around with it, I proved to myself that it does work
> if Foo::~Foo is defined in a scope where FooImpl is a complete
> type, and that it deletes it as an incomplete type if
> Foo::~Foo is declared in a different translation unit.
> I would think that it would be undefined behavior if Foo::~Foo
> is defined in a scope where FooImpl is an incomplete type.
In fact, it's undefined behavior if the class is even
instantiated in a context where Foo is not complete. I wouldn't
be surprised if some implementations complained.
> Interestingly enough, if I move the Foo::~Foo definition to
> before the FooImpl class definition in the same translation
> unit, a scope where FooImpl is an incomplete type, visual
> studios 2008 still deletes it as a complete type, which
> completely mystifies me. Is this visual studios protecting me
> from myself, and making it "do the right thing" in a case of
> undefined behavior? Or do I completely fail at understanding
> the template instantiation and name lookup rules?
It's undefined behavior; in practice, it will depend on how the
compiler instantiates templates.
--
James Kanze
== 4 of 4 ==
Date: Sun, Feb 7 2010 3:19 pm
From: James Kanze
On Feb 6, 1:23 pm, "Leigh Johnston" <le...@i42.co.uk> wrote:
[...]
> > Most uses of pimpl are as simple as this. I would be
> > skeptical of a design which had "multiple pimpl pointers".
> > The constructor body of Foo is generally that, no more, no
> > less, give or take the names. However, I suppose there's
> > nothing to lose by using std::auto_ptr either.
> Not really, there is nothing wrong with a top-level "model"
> class containing multiple objects that you don't want to
> expose in the model header file to reduce dependencies and
> compilation times.
There's nothing wrong with a top-level model class doing a lot
of things; most of the ones I deal with today contain things
like std::vector<double>, for example. But we were talking here
about the pimpl idiom. As defined by Herb Sutter. (Formally,
it's really the compilation firewall idiom, and before Herb
popularized it, it was often known as the Cheshire cat
idiom---named by Jim Adcock?) It's a very specific idiom.
> > I would think that it would be undefined behavior if
> > Foo::~Foo is defined in a scope where FooImpl is an
> > incomplete type. Interestingly enough, if I move the
> > Foo::~Foo definition to before the FooImpl class definition
> > in the same translation unit, a scope where FooImpl is an
> > incomplete type, visual studios 2008 still deletes it as a
> > complete type, which completely mystifies me. Is this visual
> > studios protecting me from myself, and making it "do the
> > right thing" in a case of undefined behavior? Or do I
> > completely fail at understanding the template instantiation
> > and name lookup rules?
> Comeau complains if you do this so I wouldn't trust an
> individual compiler's behaviour as to what constitutes
> undefined behaviour or not.
The standard says that instantiating std::auto_ptr (or any
template defined in the standard) over an incomplete type is
undefined behavior). In this case, the standard probably could
have been a bit laxer, and only required a complete type where
the destructor was instantiated. But the standard having
specified this restriction, it wouldn't surprise me if some
compiler/library implementation enforced it. (G++ enforces a
lot of this sort of thing in its library implementation; I don't
know off hand if this particular case is covered or not,
however.)
--
James Kanze
==============================================================================
TOPIC: This one seem silent on this too
http://groups.google.com/group/comp.lang.c++/t/0bb66ac02fab6d19?hl=en
==============================================================================
== 1 of 3 ==
Date: Sun, Feb 7 2010 3:27 pm
From: "**Group User**"
So it seems
== 2 of 3 ==
Date: Sun, Feb 7 2010 3:28 pm
From: "**Group User**"
On Feb 8, 6:27 am, "**Group User**" <imuaple...@gmail.com> wrote:
> So it seems
Lessen this will plzzzzzz
== 3 of 3 ==
Date: Sun, Feb 7 2010 3:29 pm
From: "**Group User**"
On Feb 8, 6:27 am, "**Group User**" <imuaple...@gmail.com> wrote:
> So it seems
will this lesson plzzzz
==============================================================================
You received this message because you are subscribed to the Google Groups "comp.lang.c++"
group.
To post to this group, visit http://groups.google.com/group/comp.lang.c++?hl=en
To unsubscribe from this group, send email to comp.lang.c+++unsubscribe@googlegroups.com
To change the way you get mail from this group, visit:
http://groups.google.com/group/comp.lang.c++/subscribe?hl=en
To report abuse, send email explaining the problem to abuse@googlegroups.com
==============================================================================
Google Groups: http://groups.google.com/?hl=en
No comments:
Post a Comment