proconlib

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

View the Project on GitHub anqooqie/proconlib

:heavy_check_mark: tests/mutable_type.test.cpp

Depends on

Code

// competitive-verifier: STANDALONE

#include <iostream>
#include "tools/mutable_type.hpp"

int main() {
  std::cin.tie(nullptr);
  std::ios_base::sync_with_stdio(false);

  static_assert(tools::mutable_type<int>);
  static_assert(tools::mutable_type<int&>);
  static_assert(tools::mutable_type<int&&>);
  static_assert(!tools::mutable_type<const int>);
  static_assert(!tools::mutable_type<const int&>);
  static_assert(!tools::mutable_type<const int&&>);

  return 0;
}
#line 1 "tests/mutable_type.test.cpp"
// competitive-verifier: STANDALONE

#include <iostream>
#line 1 "tools/mutable_type.hpp"



#include <type_traits>

namespace tools {
  template <typename T>
  concept mutable_type = !std::is_const_v<std::remove_reference_t<T>>;
}


#line 5 "tests/mutable_type.test.cpp"

int main() {
  std::cin.tie(nullptr);
  std::ios_base::sync_with_stdio(false);

  static_assert(tools::mutable_type<int>);
  static_assert(tools::mutable_type<int&>);
  static_assert(tools::mutable_type<int&&>);
  static_assert(!tools::mutable_type<const int>);
  static_assert(!tools::mutable_type<const int&>);
  static_assert(!tools::mutable_type<const int&&>);

  return 0;
}
Back to top page