bitunion.hh (6249:ba13184587a5) bitunion.hh (10289:4593282280e4)
1/*
2 * Copyright (c) 2007-2008 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 71 unchanged lines hidden (view full) ---

80 class RegularBitfieldTypes
81 {
82 protected:
83 //This class implements ordinary bitfields, that is a span of bits
84 //who's msb is "first", and who's lsb is "last".
85 template<int first, int last=first>
86 class Bitfield : public BitfieldBase<Type>
87 {
1/*
2 * Copyright (c) 2007-2008 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 71 unchanged lines hidden (view full) ---

80 class RegularBitfieldTypes
81 {
82 protected:
83 //This class implements ordinary bitfields, that is a span of bits
84 //who's msb is "first", and who's lsb is "last".
85 template<int first, int last=first>
86 class Bitfield : public BitfieldBase<Type>
87 {
88 static_assert(first >= last,
89 "Bitfield ranges must be specified as <msb, lsb>");
90
88 public:
89 operator const uint64_t () const
90 {
91 return this->getBits(first, last);
92 }
93
94 uint64_t
95 operator=(const uint64_t _data)

--- 214 unchanged lines hidden ---
91 public:
92 operator const uint64_t () const
93 {
94 return this->getBits(first, last);
95 }
96
97 uint64_t
98 operator=(const uint64_t _data)

--- 214 unchanged lines hidden ---