summary refs log tree commit diff stats
path: root/lib/std/private
diff options
context:
space:
mode:
authorJuan M Gómez <info@jmgomez.me>2023-05-30 20:47:26 +0100
committerGitHub <noreply@github.com>2023-05-30 21:47:26 +0200
commite43a51fcf3dff166838cdc3f2fc9690c5fa24846 (patch)
tree05a8f49b93236ea4478f7aca570ab9dd995a9552 /lib/std/private
parent20446b437bd6c35006fab78ed5e3bdd6f8056774 (diff)
downloadNim-e43a51fcf3dff166838cdc3f2fc9690c5fa24846.tar.gz
Implements: [C++] constructor pragma improvement (fix #21921) (#21916)
* implements: [C++] constructor pragma improvement (fix #21921)

t

* fix test so it doesnt use echo in globals

* Update compiler/ccgtypes.nim

* Update lib/std/private/dragonbox.nim

---------

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
Diffstat (limited to 'lib/std/private')
-rw-r--r--lib/std/private/dragonbox.nim4
-rw-r--r--lib/std/private/schubfach.nim4
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/std/private/dragonbox.nim b/lib/std/private/dragonbox.nim
index 2ba22a751..e39ffd9a3 100644
--- a/lib/std/private/dragonbox.nim
+++ b/lib/std/private/dragonbox.nim
@@ -75,10 +75,10 @@ const
 const
   signMask*: BitsType = not (not BitsType(0) shr 1)
 
-proc constructDouble*(bits: BitsType): Double {.constructor.} =
+proc constructDouble*(bits: BitsType): Double  =
   result.bits = bits
 
-proc constructDouble*(value: ValueType): Double {.constructor.} =
+proc constructDouble*(value: ValueType): Double  =
   result.bits = cast[typeof(result.bits)](value)
 
 proc physicalSignificand*(this: Double): BitsType {.noSideEffect.} =
diff --git a/lib/std/private/schubfach.nim b/lib/std/private/schubfach.nim
index dad8363ba..194fb4bfa 100644
--- a/lib/std/private/schubfach.nim
+++ b/lib/std/private/schubfach.nim
@@ -39,10 +39,10 @@ const
   exponentMask: BitsType = maxIeeeExponent shl (significandSize - 1)
   signMask: BitsType = not (not BitsType(0) shr 1)
 
-proc constructSingle(bits: BitsType): Single {.constructor.} =
+proc constructSingle(bits: BitsType): Single  =
   result.bits = bits
 
-proc constructSingle(value: ValueType): Single {.constructor.} =
+proc constructSingle(value: ValueType): Single  =
   result.bits = cast[typeof(result.bits)](value)
 
 proc physicalSignificand(this: Single): BitsType {.noSideEffect.} =