Commit 50f183e8 authored by Philip Trettner's avatar Philip Trettner

replace always_false with tg::always_false

parent 7bdd20e1
#pragma once
namespace glow
{
/// e.g. for static_assert(always_false<T>, "this should not compile");
/// (if the static assert should only trigger on template instantiation)
template <class T>
inline constexpr bool always_false = false;
}
......@@ -80,7 +80,7 @@ public: // gl functions with use
uniform<E[]>(name) = view;
}
else
static_assert(always_false<T>, "don't know how to convert type to uniform (or uniform array)");
static_assert(tg::always_false<T>, "don't know how to convert type to uniform (or uniform array)");
}
// returns an untyped object that can be used to assign textures and uniforms
......
......@@ -4,7 +4,6 @@
#include <glow/common/array_view.hh>
#include <glow/common/macro_join.hh>
#include <glow/common/utility.hh>
#include <glow/fwd.hh>
#include <glow/gl.hh>
......@@ -38,7 +37,7 @@ struct uniform
template <class U = T>
uniform(UsedProgram&, U&&)
{
static_assert(always_false<U>, "this type is not supported for uniforms");
static_assert(tg::always_false<U>, "this type is not supported for uniforms");
}
};
......@@ -55,7 +54,7 @@ struct uniform_proxy
template <class T>
void operator=(T const&) &
{
static_assert(always_false<T>, "this class must not be stored");
static_assert(tg::always_false<T>, "this class must not be stored");
}
private:
......@@ -103,7 +102,7 @@ struct uniform<double> : uniform_base
template <class T>
uniform(UsedProgram&, T&&)
{
static_assert(always_false<T>, "there is no API to set double uniforms and it's a bad idea anyways (pretty slow)");
static_assert(tg::always_false<T>, "there is no API to set double uniforms and it's a bad idea anyways (pretty slow)");
}
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment