proconlib

This documentation is automatically generated by competitive-verifier/competitive-verifier

View the Project on GitHub anqooqie/proconlib

:heavy_check_mark: std::is_signed extended for tools::int128_t and tools::uint128_t (tools/is_signed.hpp)

template <typename T>
struct is_signed {
  static constexpr bool value;
};

template <typename T>
inline constexpr bool is_signed_v = is_signed<T>::value;

tools::is_signed_v<T> is equivalent to std::is_signed_v<T> || std::is_same_v<std::remove_cv_t<T>, tools::int128_t>. When using libstdc++ with -std=c++... option, std::is_signed_v<tools::int128_t> is treated as false, but with tools::is_signed, it can be treated as true.

Constraints

Time Complexity

License

Author

Required by

Verified with

Code

#ifndef TOOLS_IS_SIGNED_HPP
#define TOOLS_IS_SIGNED_HPP

#include <type_traits>

namespace tools {
  template <typename T>
  struct is_signed : ::std::is_signed<T> {};

  template <typename T>
  inline constexpr bool is_signed_v = ::tools::is_signed<T>::value;
}

#endif
#line 1 "tools/is_signed.hpp"



#include <type_traits>

namespace tools {
  template <typename T>
  struct is_signed : ::std::is_signed<T> {};

  template <typename T>
  inline constexpr bool is_signed_v = ::tools::is_signed<T>::value;
}


Back to top page