Boost logo

Boost :

Subject: [boost] boost::indeterminate and std::vector::emplace_back()
From: Arno Schödl (aschoedl_at_[hidden])
Date: 2012-04-04 13:18:17


Hi,

there is a problem when using boost::indeterminate in conjunction with
std::vector::emplace_back:

        std::vector<boost::tribool> v;
        v.emplace_back(boost::indeterminate);

In VS2010, this code causes

        error C2383: '_Valty' : default-arguments are not allowed on this symbol

The error occurs becasue emplace_back's _Valty template parameter is deduced as the type of boost::indeterminate which is a function with a default argument.

What is the recommended way to explicitly create an "indeterminate" tribool value in cases like this?

Regards,

Arno

--
Dr. Arno Schödl | aschoedl_at_[hidden]
Technical Director
think-cell Software GmbH | Chausseestr. 8/E | 10115 Berlin | Germany
http://www.think-cell.com | phone +49 30 666473-10 | US phone +1 800 891 8091
Amtsgericht Berlin-Charlottenburg, HRB 85229 | European Union VAT Id DE813474306
Directors: Dr. Markus Hannebauer, Dr. Arno Schoedl

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk