www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - How does noexcept work?

reply "Jeroen Bollen" <jbinero gmail.com> writes:
If I have a function:
	 safe pure void functionName() {
		return;
	}
Where do I put the noexcept?
Nov 19 2013
parent reply "Namespace" <rswhite4 googlemail.com> writes:
On Tuesday, 19 November 2013 at 18:01:19 UTC, Jeroen Bollen wrote:
 If I have a function:
 	 safe pure void functionName() {
 		return;
 	}
 Where do I put the noexcept?
Did you mean nothrow? You can put it unfortunately on both sides. left: safe pure nothrow void functionName() { return; } right: safe pure void functionName() nothrow { return; }
Nov 19 2013
parent "Jeroen Bollen" <jbinero gmail.com> writes:
On Tuesday, 19 November 2013 at 18:09:29 UTC, Namespace wrote:
 On Tuesday, 19 November 2013 at 18:01:19 UTC, Jeroen Bollen 
 wrote:
 If I have a function:
 	 safe pure void functionName() {
 		return;
 	}
 Where do I put the noexcept?
Did you mean nothrow? You can put it unfortunately on both sides. left: safe pure nothrow void functionName() { return; } right: safe pure void functionName() nothrow { return; }
Thanks, don't mind me being stupid. I was getting confused with C++. *facepalm*
Nov 19 2013