BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bslma::UsesBslmaAllocator_Sniff< TYPE, BYPASS > Struct Template Reference

#include <bslma_usesbslmaallocator.h>

Public Types

enum  { value = k_VALUE }
 

Detailed Description

template<class TYPE, bool BYPASS>
struct bslma::UsesBslmaAllocator_Sniff< TYPE, BYPASS >

This class has a constant value that is true if the specified TYPE is implicitly convertible from bslma::Allocator *. It thus "sniffs" whether UsesBslmaAllocator<TYPE>::value should be true. If the specified BYPASS parameter is true, the conversion check is skipped and value is hard-coded to true. The bypass is needed because the xlC compiler will sometimes instantiate the copy constructor for TYPE, leading to compilation errors if TYPE is not copy constructible. This automatic sniffing is deprecated; having a type implicitly convertible from an allocator pointer is discouraged.

Member Enumeration Documentation

◆ anonymous enum

template<class TYPE , bool BYPASS>
anonymous enum
Enumerator
value 

The documentation for this struct was generated from the following file: