proxygen
folly::DefaultAlign Class Reference

#include <Memory.h>

Public Member Functions

 DefaultAlign (std::size_t align) noexcept
 
std::size_t operator() () const noexcept
 

Private Types

using Self = DefaultAlign
 

Private Attributes

std::size_t align_
 

Friends

bool operator== (Self const &a, Self const &b) noexcept
 
bool operator!= (Self const &a, Self const &b) noexcept
 

Detailed Description

Definition at line 395 of file Memory.h.

Member Typedef Documentation

Definition at line 397 of file Memory.h.

Constructor & Destructor Documentation

folly::DefaultAlign::DefaultAlign ( std::size_t  align)
inlineexplicitnoexcept

Definition at line 401 of file Memory.h.

401  : align_(align) {
402  assert(!(align_ < sizeof(void*)) && bool("bad align: too small"));
403  assert(!(align_ & (align_ - 1)) && bool("bad align: not power-of-two"));
404  }
std::size_t align_
Definition: Memory.h:398

Member Function Documentation

std::size_t folly::DefaultAlign::operator() ( ) const
inlinenoexcept

Definition at line 405 of file Memory.h.

405  {
406  return align_;
407  }
std::size_t align_
Definition: Memory.h:398

Friends And Related Function Documentation

bool operator!= ( Self const &  a,
Self const &  b 
)
friend

Definition at line 412 of file Memory.h.

412  {
413  return a.align_ != b.align_;
414  }
char b
char a
bool operator== ( Self const &  a,
Self const &  b 
)
friend

Definition at line 409 of file Memory.h.

409  {
410  return a.align_ == b.align_;
411  }
char b
char a

Member Data Documentation

std::size_t folly::DefaultAlign::align_
private

Definition at line 398 of file Memory.h.


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