Skip to content

ckout does not work with long double #3862

Description

@Sh0g0-1758

Hello! I was doing the tutorial exercises for charm++ when I noticed that ckout does not work with long double. Program to reproduce this behaviour :

mainmodule play {
    mainchare start {
        entry start(CkArgMsg* msg);
    }
}
#include<stdio.h>

#include "play.decl.h"

class start : public CBase_start {
public:
    start(CkArgMsg* m) {
        long double k = 3456.344134;
        ckout << "k = " << k << endl;
    }
};

#include "play.def.h"

Compilation error :

play.cc:9:25: error: ambiguous overload for ‘operator<< (operand types are ‘CkOutStream’ and ‘long double’)
    9 |         ckout << "k = " << k << endl;
      |         ~~~~~~~~~~~~~~~ ^~ ~
      |               |            |
      |               CkOutStream  long double

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions