Vicente J. Botet Escriba
2015-04-24 06:26:19 UTC
Hi,
we have a standard use case that would need the use of private
conditions. E.g. when we move an string lvalue, the single things that
can be done with is to destroy and assign. To capture this condition we
would need an internal state to reflect this condition.
If pre-conditions can not use non-accessible members, how this
pre-condition can be expressed?
Let me suppose that we allow non-accessible members?
Without contracts, the implementation doesn't need to represent this
internal state, if another function is used the behavior is undefined.
This mean that when adding Contracts, the implementation should need to
do something else when Contract validation is enabled, isn't it?
So the question is, wouldn't we need to standardize a compiler flag to
state that the Contract validation is enabled/disabled?
Otherwise, how a program could be portable and as efficient as possible?
If we don't want that any non-accessible member can be used in a
contract expression, don't we need at least a specific attribute to mean
accessible only on contract expressions?
What am i missing? do we want to take care of this kind of pre-conditions?
Vicente
we have a standard use case that would need the use of private
conditions. E.g. when we move an string lvalue, the single things that
can be done with is to destroy and assign. To capture this condition we
would need an internal state to reflect this condition.
If pre-conditions can not use non-accessible members, how this
pre-condition can be expressed?
Let me suppose that we allow non-accessible members?
Without contracts, the implementation doesn't need to represent this
internal state, if another function is used the behavior is undefined.
This mean that when adding Contracts, the implementation should need to
do something else when Contract validation is enabled, isn't it?
So the question is, wouldn't we need to standardize a compiler flag to
state that the Contract validation is enabled/disabled?
Otherwise, how a program could be portable and as efficient as possible?
If we don't want that any non-accessible member can be used in a
contract expression, don't we need at least a specific attribute to mean
accessible only on contract expressions?
What am i missing? do we want to take care of this kind of pre-conditions?
Vicente
--
---
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+***@isocpp.org.
To post to this group, send email to std-***@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.
---
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+***@isocpp.org.
To post to this group, send email to std-***@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.