Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. COClose, so +1, but I am not going to accept this answer as it is because there's nothing on the first page that specifies "*built-in* integral types". I'm trying to define my own integral type, which is why I want it to be sensitive to checked/unchecked context. In other words, there should be an explicit link on the first page to the documentation for built-in integral types, but there is not, so I find the page ambiguous. I found an unambiguous source, and I will accept the first answer that cites it.
      singulars
    2. COI think I got it. It's because you didn't override the implicit conversion operator and allow it to be converted to one of the built-in integral types like [this SO thread](http://stackoverflow.com/questions/7615113/define-custom-integer-based-type) suggests. Even though I can't find this explicitly stated anywhere on MSDN, I'm guessing it's similar to how switch statements work as explained by Eric Lippert at the bottom of [this thread](http://stackoverflow.com/questions/5154104/what-exactly-are-integral-types).
      singulars
    3. COOh no, that's not it at all. The correct answer is "you cannot create your own types...". Consider: If I created an implicit conversion operator to a built-in integral type, I would get overflow checking against the range of the built-in integral type, not the range of the type I'm trying to define. The example in the SO thread you link to won't roll over when it overflows in an unchecked context.
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload