Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > de.comp.lang.iso-c++ > #2043

Re: bedingte Ueberladung

From Markus Schaaf <mschaaf@elaboris.de>
Newsgroups de.comp.lang.iso-c++
Subject Re: bedingte Ueberladung
Date 2017-05-16 13:44 +0200
Organization A noiseless patient Spider
Message-ID <ofeoha$dpk$1@dont-email.me> (permalink)
References <ofcu9s.18s.1@stefan.msgid.phost.de>

Show all headers | View raw


Am 15.05.2017 um 19:07 schrieb Stefan Reuther:

> aus verschiedenen Gründen möchte ich eine Funktion einmal für 'uint32_t'
> überladen und einmal für 'size_t'. Dummerweise ist das auf gängigen
> Systemen der gleiche zugrundeliegende Datentyp, und zweimal auf den
> gleichen Typ überladen geht nicht.

Template-Foo ist ja nett, aber in diesem Fall ist der gute alte
Präprozessor wohl die richtige Wahl:

#include <stdint.h>

void foo( uint32_t );

#if SIZE_MAX != UINT32_MAX

  void foo( size_t );

#endif

MfG

Back to de.comp.lang.iso-c++ | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

bedingte Ueberladung Stefan Reuther <stefan.news@arcor.de> - 2017-05-15 19:07 +0200
  Re: bedingte Ueberladung ram@zedat.fu-berlin.de (Stefan Ram) - 2017-05-16 10:47 +0000
    Re: bedingte Ueberladung Stefan Reuther <stefan.news@arcor.de> - 2017-05-16 19:02 +0200
  Re: bedingte Ueberladung Markus Schaaf <mschaaf@elaboris.de> - 2017-05-16 13:44 +0200
    Re: bedingte Ueberladung Stefan Reuther <stefan.news@arcor.de> - 2017-05-16 18:59 +0200
  Re: bedingte Ueberladung Florian Weimer <fw@deneb.enyo.de> - 2017-05-16 20:25 +0200
    Re: bedingte Ueberladung Stefan Reuther <stefan.news@arcor.de> - 2017-05-17 18:50 +0200
      Re: bedingte Ueberladung Florian Weimer <fw@deneb.enyo.de> - 2017-05-17 19:56 +0200

csiph-web