C++ choose overloaded constructor for a stack object by condition -


i want this:

if (customlocation.isempty()) {     kurl url; } else {     kurl url(customlocation); } /* use url */ 

any reason can't do

kurl url; if (!customlocation.isempty()) {     url = kurl(customlocation); } /* use url */ 

or

kurl url = customlocation.isempty() ? kurl() : kurl(customlocation); 

Comments

Popular posts from this blog

ios - iPhone/iPad different view orientations in different views , and apple approval process -

java Extracting Zip file -

C# WinForm - loading screen -