KiCad PCB EDA Suite
arraydim.h File Reference

Go to the source code of this file.

Functions

template<typename T , std::size_t N>
constexpr std::size_t arrayDim (T const (&)[N]) noexcept
 Returns # of elements in an array. More...
 

Function Documentation

◆ arrayDim()

template<typename T , std::size_t N>
constexpr std::size_t arrayDim ( T   const(&)[N])
noexcept

Returns # of elements in an array.

This implements type-safe compile time checking

Definition at line 31 of file arraydim.h.

32 {
33  return N;
34 }

Referenced by PROJECT_ARCHIVER::Archive(), AskLoadBoardFileName(), LSET::BackAssembly(), EAGLE_PLUGIN::clear_cu_map(), BOARD_ADAPTER::createLayers(), CreatePadsShapesSection(), LSET::CuStack(), EAGLE_PLUGIN::defaultKicadLayer(), GAL_SET::DefaultVisible(), DIELECTRIC_SUBSTRATE_LIST::DIELECTRIC_SUBSTRATE_LIST(), dlg_layers(), EDA_DRAW_FRAME::EDA_DRAW_FRAME(), PROJECT::ElemsClear(), DIALOG_PRINT_PCBNEW::enableLayer(), EVT_TOOL_RANGE(), FindKicadFile(), LSET::FmtHex(), PCB_IO::formatBoardLayers(), LSET::FrontAssembly(), DIALOG_GENDRILL::GenDrillAndMapFiles(), GERBER_FILE_IMAGE::GERBER_FILE_IMAGE(), DIALOG_EXPORT_SVG::getCheckBoxSelectedLayers(), AUTOPLACER::getCollidingSides(), GetColorStandardListCount(), GetCopperFinishStandardList(), GERBER_FILE_IMAGE::GetDCODE(), GERBER_FILE_IMAGE::GetDCODEOrCreate(), GERBER_FILE_IMAGE::GetDcodesCount(), PROJECT::GetElem(), MODEL_VRML::GetLayerZ(), DIALOG_PAGES_SETTINGS::GetPageLayoutInfoFromDialog(), AUTOPLACER::getPreferredSides(), PROJECT::GetRString(), LSET::InternalCuMask(), isKeyModifierOnly(), isKeySpecialCode(), DIALOG_PRINT_PCBNEW::isLayerEnabled(), KIWAY::KiFACE(), MODEL_VRML::MODEL_VRML(), DIALOG_PAD_PROPERTIES::onAddPrimitive(), KIGFX::PCB_RENDER_SETTINGS::PCB_RENDER_SETTINGS(), PL_EDITOR_FRAME::PL_EDITOR_FRAME(), PlotLayerOutlines(), GERBER_LAYER_WIDGET::ReFillRender(), EDA_DRAW_FRAME::saveCanvasTypeSetting(), LSET::SeqStackupBottom2Top(), PROJECT::SetElem(), PGM_BASE::SetLanguageIdentifier(), BOARD::SetLayerDescr(), DIALOG_PRINT_PCBNEW::setLayerSetFromList(), PROJECT::SetRString(), LSET::TechAndUserUIOrder(), LSET::Technicals(), PANEL_GERBVIEW_SETTINGS::TransferDataToWindow(), LSET::Users(), DIALOG_EXPORT_SVG::~DIALOG_EXPORT_SVG(), and GERBER_FILE_IMAGE::~GERBER_FILE_IMAGE().