LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
util::always_false_type< typename > Struct Template Reference

A std::false_type with a template argument. More...

#include "MetaUtils.h"

Inheritance diagram for util::always_false_type< typename >:

Detailed Description

template<typename>
struct util::always_false_type< typename >

A std::false_type with a template argument.

See also
util::always_true_type, util::always_false_v

This type allows a static_assert to fail only when the template type it's in is being instantiated:

template <typename T>
struct MandatoryCustomizationPoint {
static_assert(util::always_false_type<T>(), "You have to specialize!");
};
template <typename T>
struct MandatoryCustomizationPoint<std::vector<T>> {
using type = typename std::vector<T>::reference;
};

In this example, using std::false_type instead of util::always_false_type might have tripped the compiler to trigger the assertion failure even if the class is not instantiated.

Definition at line 91 of file MetaUtils.h.


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