Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes:
> | No, enum is NOT type-safe. I started with something like
> Enums are type-safe, but also convertible to an integer type.
> (but not from integer to enum)
Hi, guys.
You might find this interesting/useful:
http://cryp.to/smart-enum/libs/smart_enum
Michael Gerz <[EMAIL PROTECTED]> writes:
| Angus Leeming wrote:
|
| >Michael Gerz <[EMAIL PROTECTED]> writes:
| >
| >> After having introduced the enum in the last two hours, I finally
| >> come to the conclusion that a simple bool type is more suitable
| >> than an enum type for which C++ does n
Angus Leeming wrote:
Michael Gerz <[EMAIL PROTECTED]> writes:
After having introduced the enum in the last two hours, I finally come
to the conclusion that a simple bool type is more suitable than an enum
type for which C++ does not provide any type-safety. There are just two
values, on an
Michael Gerz <[EMAIL PROTECTED]> writes:
| Lars Gullik Bjønnes wrote:
|
| >Michael Gerz <[EMAIL PROTECTED]> writes:
| >
| >|&& oldpar.isLineSeparator(old.pos())
| >|&& oldpar.isLineSeparator(old.pos() - 1)
| >|&& oldpar.lookupChange(old.pos() - 1).t
Michael Gerz <[EMAIL PROTECTED]> writes:
> After having introduced the enum in the last two hours, I finally come
> to the conclusion that a simple bool type is more suitable than an enum
> type for which C++ does not provide any type-safety. There are just two
> values, on and off. That's what
Lars Gullik Bjønnes wrote:
| I think I hate the comment. :-)
|
| Perhaps we should use a enum to make the code in itself clearer.
|
| oldpar.erase(old.pos() - 1, Tracking::Off);
|
| or something.
Or just drop the comment and have people learn the api's.
After having introduced the enum i
Michael Gerz <[EMAIL PROTECTED]> writes:
> Question: Should "off" be "OFF"? The coding rules suggest "off" for enum
> values, however upper case is used all over the place.
OFF tends to upset LARS who prefers not to shout and thinks that all upper case
should be used only for MACROS.
So keep him
Lars Gullik Bjønnes wrote:
Michael Gerz <[EMAIL PROTECTED]> writes:
| && oldpar.isLineSeparator(old.pos())
| && oldpar.isLineSeparator(old.pos() - 1)
| && oldpar.lookupChange(old.pos() - 1).type !=
Change::DELETED) {
| -
[EMAIL PROTECTED] (Lars Gullik Bjønnes) writes:
| Michael Gerz <[EMAIL PROTECTED]> writes:
|
| | && oldpar.isLineSeparator(old.pos())
| | && oldpar.isLineSeparator(old.pos() - 1)
| | && oldpar.lookupChange(old.pos() - 1).type !=
Change::DELETED) {
Michael Gerz <[EMAIL PROTECTED]> writes:
| && oldpar.isLineSeparator(old.pos())
| && oldpar.isLineSeparator(old.pos() - 1)
| && oldpar.lookupChange(old.pos() - 1).type !=
Change::DELETED) {
| - // We need to set the text to
Hi,
this fixes change tracking in text2.C:
fix calls to Paragraph::insertInset() and Paragraph::erase()
Michael
Index: text2.C
===
--- text2.C (Revision 13990)
+++ text2.C (Arbeitskopie)
@@ -617,7 +617,9 @@
{
BOOST_ASSERT(this
11 matches
Mail list logo