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


Groups > comp.lang.c++ > #11072

Re: Limiting function input only to __int64 but not int...

From Christian Gollwitzer <auriocus@gmx.de>
Newsgroups comp.lang.c++
Subject Re: Limiting function input only to __int64 but not int...
Date 2011-10-25 07:27 +0200
Organization A noiseless patient Spider
Message-ID <j85hcf$jil$1@dont-email.me> (permalink)
References <j824fk$5bf$1@gregory.bnet.hr> <c59f1d33-57bf-47f9-b23a-90cfff62c8c3@f36g2000vbm.googlegroups.com> <j83v8f$g91$1@gregory.bnet.hr> <is6ba7hjetjr8g1iaj947qjkfmuu6a27lc@4ax.com> <j84nvl$t9f$1@gregory.bnet.hr>

Show all headers | View raw


Am 25.10.11 00:12, schrieb A:
> "Robert Wessel"<robertwessel2@yahoo.com>  wrote in message
> news:is6ba7hjetjr8g1iaj947qjkfmuu6a27lc@4ax.com...
>> void f(__int64);  //supply actual definition
>> void f(int)=delete; //can't be called
>
> I actually like this solution but the compiler doesn't support it. I guess
> I'll be looking for alternate solutions.
>

Maybe it supports #pragma error?
Then you can write

void f(__int64);  //supply actual definition
void f(int) {
#pragma error "f must be called with an __int64"
}

Or you could forward-declare it
void f(int);
without an actual implementation; this would give a link error.

	Christian

Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Limiting function input only to __int64 but not int... "A" <a@a.a> - 2011-10-24 00:28 +0200
  Re: Limiting function input only to __int64 but not int... Ian Collins <ian-news@hotmail.com> - 2011-10-24 11:49 +1300
    Re: Limiting function input only to __int64 but not int... Juha Nieminen <nospam@thanks.invalid> - 2011-10-24 08:08 +0000
      Re: Limiting function input only to __int64 but not int... yatremblay@bel1lin202.(none) (Yannick Tremblay) - 2011-10-24 14:24 +0000
  Re: Limiting function input only to __int64 but not int... Marc <marc.glisse@gmail.com> - 2011-10-23 22:52 +0000
    Re: Limiting function input only to __int64 but not int... "A" <a@a.a> - 2011-10-24 01:32 +0200
  Re: Limiting function input only to __int64 but not int... Goran <goran.pusic@gmail.com> - 2011-10-23 23:29 -0700
    Re: Limiting function input only to __int64 but not int... "A" <a@a.a> - 2011-10-24 17:11 +0200
      Re: Limiting function input only to __int64 but not int... Robert Wessel <robertwessel2@yahoo.com> - 2011-10-24 12:17 -0500
        Re: Limiting function input only to __int64 but not int... Richard Damon <news.x.richarddamon@xoxy.net> - 2011-10-24 13:49 -0400
        Re: Limiting function input only to __int64 but not int... "A" <a@a.a> - 2011-10-25 00:12 +0200
          Re: Limiting function input only to __int64 but not int... Richard Damon <news.x.richarddamon@xoxy.net> - 2011-10-24 20:20 -0400
          Re: Limiting function input only to __int64 but not int... Christian Gollwitzer <auriocus@gmx.de> - 2011-10-25 07:27 +0200
            Re: Limiting function input only to __int64 but not int... Arne Mertz <arnemertz@googlemail.com> - 2011-10-26 01:02 -0700
  Re: Limiting function input only to __int64 but not int... Marcel Müller <news.5.maazl@spamgourmet.com> - 2011-10-24 09:18 +0200
    Re: Limiting function input only to __int64 but not int... Ian Collins <ian-news@hotmail.com> - 2011-10-24 20:53 +1300
      Re: Limiting function input only to __int64 but not int... Ian Collins <ian-news@hotmail.com> - 2011-10-24 20:58 +1300

csiph-web