Skip to content

Commit

Permalink
Improve always_false, use !std::is_same_v<S, S> instead
Browse files Browse the repository at this point in the history
  • Loading branch information
Jackarain committed Sep 20, 2023
1 parent 9eb2544 commit 2f0c1fb
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions animals/include/animals/goat.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ namespace animals
static const std::string ie_user_agent = R"(Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko)";
static const std::string curl_user_agent = R"(curl/7.64.0)";

template<class ... T> inline constexpr bool always_false = false;

template <typename Executor = net::any_io_executor>
class basic_goat
{
Expand Down Expand Up @@ -694,7 +692,7 @@ namespace animals
}
else
{
static_assert(always_false<S>, "non-exhaustive visitor!");
static_assert(!std::is_same_v<S, S>, "non-exhaustive visitor!");
}
}

Expand Down

0 comments on commit 2f0c1fb

Please sign in to comment.