Ignore:
Timestamp:
Jun 5, 2019, 8:36:48 PM (5 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
866545b
Parents:
67130fe (diff), 3cd5fdd (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

fix conflicit

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Bitfield.hpp

    r67130fe rc6a1e8a  
    99// Author           : Aaron B. Moss
    1010// Created On       : Thu May 9 10:00:00 2019
    11 // Last Modified By : Aaron B. Moss
    12 // Last Modified On : Thu May 9 10:00:00 2019
    13 // Update Count     : 1
     11// Last Modified By : Andrew Beach
     12// Last Modified On : Wed Jun 5 10:00:00 2019
     13// Update Count     : 2
    1414//
    1515
    1616#pragma once
    1717
    18 #include <strings.h>  // for ffs
     18#include <strings.h>   // for ffs
     19#include <type_traits> // for is_unsigned
    1920
    2021/// Make a type a bitfield.
     
    2425template<typename T>
    2526struct bitfield : public T {
    26         static_assert(sizeof(T) == sizeof(unsigned int), "Type has incorrect size");
    2727        using T::val;
    2828        using val_t = decltype(val);
     29        static_assert(sizeof(T) == sizeof(unsigned int), "Type has incorrect size");
     30        static_assert(std::is_unsigned<val_t>::value, "Bitfield val field is not unsigned.");
    2931
    3032        constexpr bitfield() : T( 0 ) {}
Note: See TracChangeset for help on using the changeset viewer.