• if constexpr as it should be

    From Bonita Montero@3:633/280.2 to All on Thu Jul 17 22:41:40 2025
    I think if constexpr should be extended in a way that the not compiled
    branch is only syntactically analyzed but not semantically; currently
    this holds true only for generic code. With that you could have opera-
    tions that are only meaningful if that branch is actually compiled.


    --- MBSE BBS v1.1.1 (Linux-x86_64)
    * Origin: A noiseless patient Spider (3:633/280.2@fidonet)
  • From Marcel Mueller@3:633/280.2 to All on Fri Jul 18 05:50:18 2025
    Am 17.07.25 um 14:41 schrieb Bonita Montero:
    I think if constexpr should be extended in a way that the not compiled
    branch is only syntactically analyzed but not semantically; currently
    this holds true only for generic code. With that you could have opera-
    tions that are only meaningful if that branch is actually compiled.

    -v

    Do you have an example, that is _not_ working with the current
    implementation?


    Marcel

    --- MBSE BBS v1.1.1 (Linux-x86_64)
    * Origin: MB-NET.NET for Open-News-Network e.V. (3:633/280.2@fidonet)
  • From Bonita Montero@3:633/280.2 to All on Fri Jul 18 16:38:33 2025
    Am 17.07.2025 um 21:50 schrieb Marcel Mueller:
    Am 17.07.25 um 14:41 schrieb Bonita Montero:
    I think if constexpr should be extended in a way that the not compiled
    branch is only syntactically analyzed but not semantically; currently
    this holds true only for generic code. With that you could have opera-
    tions that are only meaningful if that branch is actually compiled.

    -v

    Do you have an example, that is _not_ working with the current implementation?

    If constexpr does ignore semanically invalid code for the inactive
    branch only if it is related to a generic type, i.e. it doesn't make
    a semantical analysis with that. This should be true for the complete
    branch.


    --- MBSE BBS v1.1.1 (Linux-x86_64)
    * Origin: A noiseless patient Spider (3:633/280.2@fidonet)