Click here to Skip to main content
Email Password   helpLost your password?
Friendly Url http://www.codeproject.com/Members/Nemanja-Trifunovic
Member No. 14112     
Reputation Points
8,825
Author
3,763
Authority
6
Editor
8
Enquirer
5,030
Organiser
452
Participant
10,114
Debator
28,198
Total
Awards 24 Aug 2009: Best C++/MFC article of July 2009
24 Feb 2007: Best C++/MFC article of Jan 2007
Questions & Answers Answers: 20
Messages Posted 4,985 - Personality
Articles / Tech Blogs Articles: 15
Tips/Tricks Posted
Biography Born in Kragujevac, Serbia, and lived there until 2000. Spent four wonderful years in San Diego, California, one year in Boston, one in New York and now lives again in Boston area with his wife and two little daughters.

Wrote his first program in 1984, became a professional developer after he graduated in 1994. After all these years still very passionate about programming and software development in general.
Location United States United States
Job Title Software Developer
Company
Member since Tuesday, June 12, 2001
(8 years, 9 months)
Homepage
For more information on Reputation please see the FAQ.
You must Sign In to use this message board.
 
 
 FirstPrevNext
GeneralConcepts voted out of C++ 0x Pin
Nemanja Trifunovic
Monday, July 20, 2009 8:02 AM
A shocking news from the the C++ standards committee meeting in Frankfurt: concepts are removed from the new C++ standard[^]. It seems that we are going to deal with "interesting" compiler errors from templated code.


 
GeneralWindows Web Services API Pin
Nemanja Trifunovic
Tuesday, March 31, 2009 11:23 AM
Ever since ATL Server[^] was moved to CodePlex, we have had no native SOAP library from Microsoft. Now, there is Windows Web Services API (WWSAPI)[^] which comes preinstalled on Windows 7 and Windows Server 2008, but can be separatelly installed even on XP.


GeneralRe: Windows Web Services API Pin
Rajesh R Subramanian
10:28 26 Jun '09  
 
GeneralRvalue references Pin
Nemanja Trifunovic
Thursday, March 13, 2008 5:42 AM
A nice and easy to reade article A Brief Introduction to Rvalue References[^] was published at artima.com

What is the deal with rvalue references? They are introduced to enable move semantics, which would avoid many unneeded copies - think factory functions, STL containers, etc.

Another good article on the same topic can be found here[^]


GeneralRe: Rvalue references Pin
Hamid.
7:53 23 May '08  
GeneralRe: Rvalue references Pin
Nemanja Trifunovic
8:12 23 May '08  
GeneralRe: Rvalue references Pin
super_ttd
10:50 20 Aug '08  
nice article.

BTW, it's just a bare copy of an article written almost 2 year before article from the same authors:
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2027.html[^]



 
GeneralState of C++ Evolution Pin
Nemanja Trifunovic
Tuesday, March 4, 2008 12:31 PM
The current state of the new C++ 09 Standard is summed up here[^].

The best thing I see is that the Garbage Collector is dropped out Jig


GeneralRe: State of C++ Evolution Pin
Rajesh R Subramanian
7:38 5 Mar '08  
 
GeneralBoost 1.34.0 Pin
Nemanja Trifunovic
Monday, May 14, 2007 9:27 AM
It's been a while, but finally the new version of Boost[^] is out.

Among the new libraries there is Boost.Foreach[^] which enables something like:

std::string hello( "Hello, world!" );

BOOST_FOREACH( char ch, hello )
{
std::cout << ch;
}

Also, there are Boost Statechart[^] for easy coding of finite state machines, Expressive[^], a regex library that enables compile time regexes and Boost.Typeof[^] that offers a library-based alternative to the typeof keyword, planned to be introduced in the next version of the Standard.

As for the library updates, I find the performance optimization of Boost.Function significant - now it doesn't use heap at all in some cases.


 
GeneralCopying C-style arrays [modified] Pin
Nemanja Trifunovic
Tuesday, January 30, 2007 4:29 AM
It always astonishes me how I learn something new after all these years of programming with C++.

Say you have a built-in array of C++ string objects:

string s1[3] = {"1", "2", "3"};

Declare the second array of the same type, and try to assign the first array to the second one:

string s2[3];
s2 = s1;

and you'll get a compiler error (C2106 with VC++ 8.0).

OK, we all knew that, right? But what happens if we just wrap it in a class:

struct test {
string s[3];
};

// ...
test a = {"1","2","3"};
test b = a;

This works just fine: members of b are copies of the members of a.

This is the result of the standard behavior of default copy constructors:

The implicitly-defined copy constructor for class X performs a member-
wise copy of its subobjects. The order of copying is the same as the
order of initialization of bases and members in a user-defined con-
structor (see _class.base.init_). Each subobject is copied in the
manner appropriate to its type:


--if the subobject is of class type, the copy constructor for the
class is used;


--if the subobject is an array, each element is copied, in the manner
appropriate to the element type;



--if the subobject is of scalar type, the built-in assignment operator
is used.




GeneralRe: Copying C-style arrays Pin
yadrif
7:01 2 Oct '07  
GeneralRe: Copying C-style arrays Pin
Nemanja Trifunovic
9:54 2 Oct '07  
 
GeneralDisabling checked iterators in VC 8.0 Pin
Nemanja Trifunovic
Wednesday, October 4, 2006 3:34 AM
Many developers are shocked by a drop in performance when upgrading an application that uses STL from VC 2003 to VC 2005. The reason for this is that the MS version of the Standard Library has checked iterators[^]switched on by default even in release mode. To turn this feature off, define _SECURE_SCL to be 0 in your project settings; the performance gain is impressive.




 
GeneralC++0x: Lambda expressions Pin
Nemanja Trifunovic
Tuesday, March 21, 2006 9:48 AM
I was happy to learn that an official proposal for introducing lambda expressions to the next version of the C++ Standard was submitted.

According to that proposal, a lambda expression would look like:

&lt>(int n)->int {return 2*n;}
That may not be very pretty, but who cares - as long as we don't need to write functors for every for_each operation.

The proposal can be found here[^]



My programming blahblahblah blog. If you ever find anything useful here, please let me know to remove it.

 
Generalfor each in C++ 0x Pin
Nemanja Trifunovic
Wednesday, December 28, 2005 3:09 PM
According to Herb Sutter's PDC presentation[^], for each syntax in C++0x will most likely be modeled after Java, and not after C# or C++/CLI. It may be we will write something like:

for each (int i : v) {...}

rather than

for each (int i in v) {...}

Two small remarks from my side:

1. Isn't C++ too expressive already? I know the C++ standard comitee is very reluctant to introduce new keywords, but the price is too often reduced readability.
2. Is C++ now catching up with Java and C#? Of course, with all these millions of existing lines of code written in C++, being conservative is the only way to go, but where is the fine line between the helthy dose of conservativism and becoming obsolete? For instance, C# 3.0 is getting lambda expressions, and it is going to be released probably in a couple of years. The next version of C++, optimistically called C++0x which may or may not include lambda expressions is far from being adopted, and even when it happens, how long will it take for major compiler vendors to implement its features?


My programming blahblahblah blog. If you ever find anything useful here, please let me know to remove it.

GeneralRe: for each in C++ 0x Pin
toxcct
1:03 31 Jan '06  
GeneralRe: for each in C++ 0x Pin
Pavel Vozenilek
18:25 18 Mar '06  
GeneralRe: for each in C++ 0x Pin
Nemanja Trifunovic
2:44 19 Mar '06  
GeneralRe: for each in C++ 0x Pin
Pavel Vozenilek
15:02 19 Mar '06  
 
GeneralType inference in C++ 0x Pin
Nemanja Trifunovic
Sunday, December 18, 2005 6:25 AM
One of the language features that are likely to get included into the next version of the standard is type inference. Namely, if the compiler can deduce the type of the variable, we can declare it with keyword auto:
auto i = 1;
Many people confuse type inference with variant types, but it is not the case. In the sample above, i is declared as int, not variant. In other words, it is exactly equivalent to:
int i = 1;
Type inference is also going to be included in C# 3.0, but the choice of the keyword is very unfortunate: var. For instance the same construct:
var i = 1;
means one thing in JavaScript (i is variant) and another in C# (i is int)

How is this useful? It can save us a lot of typing, and annoying syntax errors. Say we have:
vector<int> v;
vector<int>::iterator b = v.begin(); //without type inference
auto e = v.end(); // with type inference
For more information, see the official proposal document.[^]

GeneralRe: Type inference in C++ 0x Pin
toxcct
0:57 31 Jan '06  
GeneralRe: Type inference in C++ 0x Pin
Nemanja Trifunovic
2:57 31 Jan '06  
 
GeneralVisual C++ 2005 Pin
Nemanja Trifunovic
Friday, November 18, 2005 2:47 AM
In general, I try to be somewhat conservative when it comes to adopting new technologies in production work. Sure, it is important to stay informed and try all the latest buzz, but for the work that actually brings food to the table I prefer widely adopted and well tested tools.

Having said all that, I spent last couple of days porting the client side of a distributed linguistic application from VC++ 6.0 to VC++ 8.0 (aka VC++ 2005), and the later was released a couple of weeks ago. That was a two-step operation: first I did the port from 6.0 to 7.1 which I know very well, and once it compiled there, another step was from 7.1 to 8.0.

It was somewhat surprising how many errors appeared in the second step. Most of them actually come from unstandard programming practices that originate in VC 6.0, but were tolerated in VC 7.1 (declarations within for loops, wchar_t a typedef for unsigned short,...), but some of them are really surprising. For instance, I found out that some libraries (xalan, crypto++) compile fine in Release mode, but in compile mode they report compile error C2678 somewhere from xutility. The solution is not exactly obvious: adding a preprocessor definition _HAS_ITERATOR_DEBUGGING=0.

All in all, I like VC 2005 so far. The compiler is better, and IDE has some nice new features: Error window, graying out "ifdef-ed" code, Intelisense is better than ever. The interesting question is C++/CLI. Is it going to be adopted among developers? I wish it did, but frankly it would surprise me: C++ developers don't need .NET, and .NET developers don't know what to do with C++.




My programming blahblahblah blog. If you ever find anything useful here, please let me know to remove it.
QuestionRe: Visual C++ 2005 Pin
ddtopham
20:29 5 May '07  


Last Updated 21 Mar 2010 | Advertise | Privacy | Terms of Use | Copyright © CodeProject, 1999-2010