Boost logo

Boost Users :

Subject: [Boost-users] How to make is_arithmetic true for a UDT
From: Paul A. Bristow (pbristow_at_[hidden])
Date: 2012-07-12 04:37:41


I am facing the need to get my User Defined Type to return true from

  boost::is_arithmetic

(This is to meet a check for autoprefixing in Boost.Units)

There was some discussion on this issue before,

http://lists.boost.org/boost-users/2007/10/31538.php

but I am not clear if it reached a satisfactory conclusion.

(Nor that I fully understand what is being proposed).

A cut-down example is a Trivial UDT that does exactly same as double.
(My actual example has template parameter for floating-point type of two members, a value and an
uncertainty, and others).

Suggestions?

Paul

-- -
Paul A. Bristow,
Prizet Farmhouse, Kendal LA8 8AB UK
+44 1539 561830 07714330204
pbristow_at_[hidden]


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net