proconlib

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

View the Project on GitHub anqooqie/proconlib

:heavy_check_mark: Concept for a mutable type (tools/mutable_type.hpp)

template <typename T>
concept mutable_type = !std::is_const_v<std::remove_reference_t<T>>;

The concept is used to constrain template parameters to non-const types, ensuring that the referenced type can be modified.

Example

T tools::mutable_type<T>
int true
int& true
int&& true
const int false
const int& false
const int&& false

Constraints

Time Complexity

License

Author

Required by

Verified with

Code

#ifndef TOOLS_MUTABLE_TYPE_HPP
#define TOOLS_MUTABLE_TYPE_HPP

#include <type_traits>

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

#endif
#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>>;
}


Back to top page