octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #41145] Building with 64 bit indexing fails on


From: Lasse Schuirmann
Subject: [Octave-bug-tracker] [bug #41145] Building with 64 bit indexing fails on ArchLinux and Ubuntu
Date: Wed, 08 Jan 2014 15:04:38 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:29.0) Gecko/20100101 Firefox/29.0

Follow-up Comment #6, bug #41145 (project octave):

Thinking about a more general and more meaningful method: what about a macro
for securing constant values?


/**
 * Makes sure that no ambiguities occur when using constants.
 *
 * @param type The type to ensure.
 * @param value The value.
 */
#define  SECURE_CONST(type, value)  static_cast<type>(value)

/**
 * Simplification for SECURE_CONST.
 */
#define  SECURE_IDX_CONST(value)  SECURE_CONST(octave_idx_type, (value))


When using SECURE_IDX_CONST(0) I think it is pretty obvious that this is a
type ensurance.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?41145>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]