Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Made bitfields() nothrow #586

Closed
wants to merge 1 commit into from

3 participants

David Nadlinger Guillaume Chatelet

No description provided.

David Nadlinger
Collaborator

Sorry, seems like Alex was faster on this one (see #583).

Guillaume Chatelet

We should probably close this one so.

David Nadlinger
Collaborator

Yes, indeed, but I don't have the permissions to do so.

Oh lol, am I the one who's supposed to close it? (Haven't really done this before...)

wfunction closed this
wfunction reopened this
wfunction closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

May 16, 2012
Mde bitfields() methods be 'nothrow' 83c3609
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 4 additions and 4 deletions. Show diff stats Hide diff stats

  1. 8  std/bitmanip.d
8  std/bitmanip.d
@@ -80,17 +80,17 @@ private template createAccessors(
80 80
             static assert(len == 1);
81 81
             enum result =
82 82
             // getter
83  
-                "@property bool " ~ name ~ "() const { return "
  83
+                "@property bool " ~ name ~ "() const nothrow { return "
84 84
                 ~"("~store~" & "~myToString(maskAllElse)~") != 0;}\n"
85 85
             // setter
86  
-                ~"@property void " ~ name ~ "(bool v){"
  86
+                ~"@property void " ~ name ~ "(bool v) nothrow {"
87 87
                 ~"if (v) "~store~" |= "~myToString(maskAllElse)~";"
88 88
                 ~"else "~store~" &= ~"~myToString(maskAllElse)~";}\n";
89 89
         }
90 90
         else
91 91
         {
92 92
             // getter
93  
-            enum result = "@property "~T.stringof~" "~name~"() const { auto result = "
  93
+            enum result = "@property "~T.stringof~" "~name~"() const nothrow { auto result = "
94 94
                 "("~store~" & "
95 95
                 ~ myToString(maskAllElse) ~ ") >>"
96 96
                 ~ myToString(offset) ~ ";"
@@ -100,7 +100,7 @@ private template createAccessors(
100 100
                    : "")
101 101
                 ~ " return cast("~T.stringof~") result;}\n"
102 102
             // setter
103  
-                ~"@property void "~name~"("~T.stringof~" v){ "
  103
+                ~"@property void "~name~"("~T.stringof~" v) nothrow { "
104 104
                 ~"assert(v >= "~name~"_min); "
105 105
                 ~"assert(v <= "~name~"_max); "
106 106
                 ~store~" = cast(typeof("~store~"))"
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.