Go back to Richel Bilderbeek's homepage.

Go back to Richel Bilderbeek's C++ page.

 

 

 

 

 

(C++) borland.hpp: Only member functions may be 'const' or 'volatile'

 

Compile error.

 

 

 

 

 

Full error message

 

[C++ Error] borland.hpp(15): E2310 Only member functions may be 'const' or 'volatile'

 

 

 

 

 

Cause

 

IDE: C++ Builder 6.0

Compiler: Borland BCC32.EXE version 6.0.10.157

Project type: Console Application

Boost version: 1.35.0

 

#include <boost/multi_array.hpp>

int main()
{

}

 

The compiler will show you the code of boost/concept/borland/borland.hpp:

 

// Copyright David Abrahams 2006. Distributed under the Boost
// Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_CONCEPT_DETAIL_BORLAND_DWA2006429_HPP
# define BOOST_CONCEPT_DETAIL_BORLAND_DWA2006429_HPP
 
# include <boost/preprocessor/cat.hpp>
 
namespace boost { namespace concept {
 
template <class ModelFnPtr>
struct require;
 
template <class Model>
struct require<void(*)(Model)> //THIS LINE
{
    enum { instantiate = sizeof((((Model*)0)->~Model()), 3) };
};
 
//More code...

 

 

 

 

 

Solution

 

Probably, you should obtain a better compiler :-(.

 

 

 

 

 

Go back to Richel Bilderbeek's C++ page.

Go back to Richel Bilderbeek's homepage.

 

Valid XHTML 1.0 Strict