Skip to content

Instantly share code, notes, and snippets.

@rbock
Created August 27, 2014 08:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rbock/b573ee3d024902998e3e to your computer and use it in GitHub Desktop.
Save rbock/b573ee3d024902998e3e to your computer and use it in GitHub Desktop.
#include <type_traits>
namespace sqlpp
{
namespace detail
{
// A template that always returns false
// To be used with static assert, for instance, to ensure it
// fires only when the template is instantiated.
template<typename T>
struct wrong
{
using type = std::false_type;
};
}
template<typename T>
using wrong_t = typename detail::wrong<T>::type;
}
namespace other
{
template<typename T>
struct x
{
static_assert(::sqlpp::wrong_t<x>::value, "");
};
}
int main()
{
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment