Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/bits/containers.hfa

    r2233ad4 rffe2fad  
    99// Author           : Thierry Delisle
    1010// Created On       : Tue Oct 31 16:38:50 2017
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Jun 26 08:52:20 2019
    13 // Update Count     : 4
     11// Last Modified By : --
     12// Last Modified On : --
     13// Update Count     : 0
    1414
    1515#pragma once
     
    7878//-----------------------------------------------------------------------------
    7979#ifdef __cforall
    80         forall(dtype TYPE)
     80        forall(dtype TYPE | is_node(TYPE))
    8181        #define T TYPE
    8282#else
     
    9595
    9696#ifdef __cforall
    97         forall(dtype T)
     97        forall(dtype T | is_node(T))
    9898        static inline void ?{}( __stack(T) & this ) {
    9999                (this.top){ NULL };
     
    116116                return top;
    117117        }
    118 
    119         forall(dtype T | is_node(T))
    120         static inline int ?!=?( const __stack(T) & this, __attribute__((unused)) zero_t zero ) {
    121                 return this.top != 0;
    122         }
    123118#endif
    124119
     
    127122//-----------------------------------------------------------------------------
    128123#ifdef __cforall
    129         forall(dtype TYPE)
     124        forall(dtype TYPE | is_node(TYPE))
    130125        #define T TYPE
    131126#else
     
    146141#ifdef __cforall
    147142
    148         forall(dtype T)
     143        forall(dtype T | is_node(T))
    149144        static inline void ?{}( __queue(T) & this ) with( this ) {
    150145                head{ NULL };
     
    191186
    192187        forall(dtype T | is_node(T))
    193         static inline int ?!=?( const __queue(T) & this, __attribute__((unused)) zero_t zero ) {
     188        static inline bool ?!=?( __queue(T) & this, __attribute__((unused)) zero_t zero ) {
    194189                return this.head != 0;
    195190        }
     
    273268
    274269        forall(dtype T | sized(T))
    275         static inline int ?!=?( const __dllist(T) & this, __attribute__((unused)) zero_t zero ) {
     270        static inline bool ?!=?( __dllist(T) & this, __attribute__((unused)) zero_t zero ) {
    276271                return this.head != 0;
    277272        }
Note: See TracChangeset for help on using the changeset viewer.