MCPcopy Create free account
hub / github.com/Extra-Creativity/Modern-Cpp-Basics / Array

Class Array

12-Advanced Template/code/Lazy.cpp:4–8  ·  view source on GitHub ↗

This should be std::size_t at best; we just want to illustrate lazy instantiation, so here we need N <= 0 to make Array ill-formed.

Source from the content-addressed store, hash-verified

2 // illustrate lazy instantiation, so here we need N <= 0
3 // to make Array<N> ill-formed.
4class Array
5{
6public:
7 int arr[N];
8};
9
10template<typename T>
11T v = T::default_value();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected