Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c++ > #88420
| From | Muttley@dastardlyhq.com |
|---|---|
| Newsgroups | comp.lang.c++ |
| Subject | Re: Bitset with data type based upon value ranges |
| Date | 2023-01-07 11:19 +0000 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <tpbkfc$3rr$1@gioia.aioe.org> (permalink) |
| References | <cbda91e9-0c7b-428e-a3fb-f930acc27627n@googlegroups.com> |
On Fri, 6 Jan 2023 16:14:26 -0800 (PST)
Aaron Gray <aaronngray@gmail.com> wrote:
>Hi,
>I am looking for some template code to generate a type based upon a constant
>within value ranges, for specialization of a bitset class.
>
>0...7 - unsigned char
>8..15 - unsigned short
>16...31 - unsigned int
>32...63 - unsigned long
>64...127 - unsigned long long
>128... - unsigned long long [] - array
>
>```
>#include <cstddef>
>
>template <size_t BITS>
>class bitset {
>public:
> ....
> WORDTYPE data;
> ....
>};
>```
>
>I am looking for solutions both with and without concepts for comparison, if
>its possible without and its simpler I will use that solution unless there is
>some real advantages to using concepts.
>
>Many thanks in advance,
Do you own coursework.
Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Bitset with data type based upon value ranges Aaron Gray <aaronngray@gmail.com> - 2023-01-06 16:14 -0800
Re: Bitset with data type based upon value ranges Aaron Gray <aaronngray@gmail.com> - 2023-01-06 17:48 -0800
Re: Bitset with data type based upon value ranges "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-01-07 12:45 -0800
Re: Bitset with data type based upon value ranges Aaron Gray <aaronngray@gmail.com> - 2023-01-07 16:42 -0800
Re: Bitset with data type based upon value ranges Muttley@dastardlyhq.com - 2023-01-09 09:18 +0000
Re: Bitset with data type based upon value ranges Muttley@dastardlyhq.com - 2023-01-07 11:19 +0000
Re: Bitset with data type based upon value ranges Aaron Gray <aaronngray@gmail.com> - 2023-01-07 09:32 -0800
Re: Bitset with data type based upon value ranges Öö Tiib <ootiib@hot.ee> - 2023-01-07 08:49 -0800
Re: Bitset with data type based upon value ranges Aaron Gray <aaronngray@gmail.com> - 2023-01-07 09:30 -0800
Re: Bitset with data type based upon value ranges Öö Tiib <ootiib@hot.ee> - 2023-01-07 10:09 -0800
Re: Bitset with data type based upon value ranges Aaron Gray <aaronngray@gmail.com> - 2023-01-07 15:46 -0800
csiph-web