From 99d025af4de80e1e232539cbe73e8f4619ff393d Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Thu, 19 Nov 2015 15:06:23 +1100 Subject: [PATCH] strongdef: actually use tagging for disambiguation... --- strongdef.cpp | 2 +- strongdef.hpp | 8 ++++---- test/strongdef.cpp | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/strongdef.cpp b/strongdef.cpp index 580abcf5..4d7a888c 100644 --- a/strongdef.cpp +++ b/strongdef.cpp @@ -23,4 +23,4 @@ using util::strongdef; // This instantiation is not meant to be exported, only being used as a local // compilation error canary. -template struct util::strongdef; +template struct util::strongdef; diff --git a/strongdef.hpp b/strongdef.hpp index 4bc98d98..94a7bdb4 100644 --- a/strongdef.hpp +++ b/strongdef.hpp @@ -22,7 +22,7 @@ namespace util { /// A transparent wrapper around a (typically lightweight) type for the /// purposes of overload disambiguation. It acts like a typesafe typedef. - template + template struct strongdef { public: using value_type = T; @@ -45,9 +45,9 @@ namespace util { namespace std { - template - struct numeric_limits> { - using value_type = typename util::strongdef::value_type; + template + struct numeric_limits> { + using value_type = typename util::strongdef::value_type; static constexpr bool is_specialized = numeric_limits::is_specialized; static constexpr bool is_signed = numeric_limits::is_signed; diff --git a/test/strongdef.cpp b/test/strongdef.cpp index 4db4dce1..e7016305 100644 --- a/test/strongdef.cpp +++ b/test/strongdef.cpp @@ -10,7 +10,7 @@ main (void) util::TAP::logger tap; // These tests are less about functional testing, and more about link testing. - strongdef fortytwo (42u); + strongdef fortytwo (42u); tap.expect_eq (fortytwo.data, 42u, "raw data equality"); tap.expect_eq (fortytwo, 42u, "passthrough equality");